.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/gallery/sequence/annotation/operon_map.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_examples_gallery_sequence_annotation_operon_map.py: Feature map of a synthetic operon ================================= This script shows how to create a picture of an synthetic operon for publication purposes. .. GENERATED FROM PYTHON SOURCE LINES 8-49 .. image-sg:: /examples/gallery/sequence/annotation/images/sphx_glr_operon_map_001.png :alt: operon map :srcset: /examples/gallery/sequence/annotation/images/sphx_glr_operon_map_001.png :class: sphx-glr-single-img .. code-block:: Python # Code source: Patrick Kunzmann # License: BSD 3 clause import matplotlib.pyplot as plt import biotite.sequence.graphics as graphics from biotite.sequence import Annotation, Feature, Location strand = Location.Strand.FORWARD prom = Feature( "regulatory", [Location(10, 50, strand)], {"regulatory_class": "promoter", "note": "T7"}, ) rbs1 = Feature( "regulatory", [Location(60, 75, strand)], {"regulatory_class": "ribosome_binding_site", "note": "RBS1"}, ) gene1 = Feature("gene", [Location(81, 380, strand)], {"gene": "gene1"}) rbs2 = Feature( "regulatory", [Location(400, 415, strand)], {"regulatory_class": "ribosome_binding_site", "note": "RBS2"}, ) gene2 = Feature("gene", [Location(421, 1020, strand)], {"gene": "gene2"}) term = Feature( "regulatory", [Location(1050, 1080, strand)], {"regulatory_class": "terminator"} ) annotation = Annotation([prom, rbs1, gene1, rbs2, gene2, term]) fig = plt.figure(figsize=(8.0, 0.8)) ax = fig.add_subplot(111) graphics.plot_feature_map( ax, annotation, multi_line=False, loc_range=(1, 1101), ) fig.tight_layout() plt.show() .. _sphx_glr_download_examples_gallery_sequence_annotation_operon_map.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: operon_map.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: operon_map.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_