.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_bam.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_bam.py: BAM module example ================== Plot histogram of MAPQ values contained in a BAM file .. GENERATED FROM PYTHON SOURCE LINES 10-13 Get a data set (BAM file) for testing ################################################ first import the relevant modules .. GENERATED FROM PYTHON SOURCE LINES 13-17 .. code-block:: Python from sequana import BAM, sequana_data datatest = sequana_data("test.bam", "doc") .. GENERATED FROM PYTHON SOURCE LINES 18-19 Use :class:`sequana.bamtools.BAM` class to plot the MAPQ historgram .. GENERATED FROM PYTHON SOURCE LINES 19-28 .. code-block:: Python b = BAM(datatest) b.plot_bar_mapq() # for some unknown reasons, we must call show in this example for this image to # appear in the doc from pylab import show show() .. image-sg:: /auto_examples/images/sphx_glr_plot_bam_001.png :alt: plot bam :srcset: /auto_examples/images/sphx_glr_plot_bam_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.372 seconds) .. _sphx_glr_download_auto_examples_plot_bam.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_bam.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_bam.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_bam.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_