.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_coverage.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_coverage.py: Coverage module example ============================= .. GENERATED FROM PYTHON SOURCE LINES 9-12 .. code-block:: Python from sequana import SequanaCoverage, sequana_data bedfile = sequana_data("JB409847.bed") .. GENERATED FROM PYTHON SOURCE LINES 13-14 Reading input BED file .. GENERATED FROM PYTHON SOURCE LINES 14-17 .. code-block:: Python gc = SequanaCoverage(bedfile) .. rst-class:: sphx-glr-script-out .. code-block:: none 0it [00:00, ?it/s] 1it [00:00, 214.07it/s] .. GENERATED FROM PYTHON SOURCE LINES 18-19 Select a chromosome (first and only one in that example) .. GENERATED FROM PYTHON SOURCE LINES 19-22 .. code-block:: Python chrom = gc[0] print(chrom) .. rst-class:: sphx-glr-script-out .. code-block:: none Chromosome length: 19795 Sequencing depth (DOC): 931.31 Sequencing depth (median): 988.00 Breadth of coverage (BOC) (percent): 96.60 Coverage standard deviation: 237.15 Coverage coefficient variation: 0.25 .. GENERATED FROM PYTHON SOURCE LINES 23-25 Compute running median and zscore telling the algorithm that the chromosome is circular. .. GENERATED FROM PYTHON SOURCE LINES 25-29 .. code-block:: Python chrom.running_median(n=5001, circular=True) chrom.compute_zscore() print(chrom.get_centralness()) .. rst-class:: sphx-glr-script-out .. code-block:: none 0.8684516291992928 .. GENERATED FROM PYTHON SOURCE LINES 30-31 Plotting .. GENERATED FROM PYTHON SOURCE LINES 31-32 .. code-block:: Python chrom.plot_coverage() .. image-sg:: /auto_examples/images/sphx_glr_plot_coverage_001.png :alt: plot coverage :srcset: /auto_examples/images/sphx_glr_plot_coverage_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.304 seconds) .. _sphx_glr_download_auto_examples_plot_coverage.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_coverage.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_coverage.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_coverage.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_