5.1. BAM module exampleΒΆ

Plot histogram of MAPQ values contained in a BAM file

from sequana import BAM, sequana_data

Get a data set (BAM file) for testing

from sequana import BAM, sequana_data
datatest = sequana_data('test.bam', "testing")

Use sequana.bamtools.BAM class to plot the MAPQ historgram

b = BAM(datatest)
b.plot_bar_mapq()
../_images/sphx_glr_plot_bam_001.png

Total running time of the script: (0 minutes 0.851 seconds)

Download Python source code: plot_bam.py
Download IPython notebook: plot_bam.ipynb