plot_plasmid_map#

biotite.sequence.graphics.plot_plasmid_map(axes, annotation, plasmid_size, tick_length=0.02, tick_step=200, ring_width=0.01, feature_width=0.06, spacing=0.01, arrow_head_length=0.04, label=None, face_properties=None, label_properties=None, omit_oversized_labels=True, feature_formatter=None)[source]#

Plot a plasmid map using the sequence features in the given Annotation.

Each feature location is depicted either by a curved arrow, indicating on which strand the feature resides, or an arc. The ticks indicate the sequence position.

EXPERIMENTAL: The API and the resulting plots will probably change in future versions.

Parameters:
axesPolarAxes

A Matplotlib axes, that is used as plotting area. A polar projection is required.

annotationAnnotation

The annotation to be visualized.

plasmid_sizeint

The size of the plasmid, i.e. the length of its sequence.

tick_lengthfloat, optional

The length of the axis ticks as percentage of the plot radius.

tick_stepint, optional

The interval between the displayed sequence positions. For example tick_step=200 means that ticks will be displayed at 1, 200, 400, 600, etc.

ring_widthfloat, optional

The width of the outer ring as percentage of the plot radius.

feature_widthfloat, optional

The width of each feature arrow/arc as percentage of the plot radius.

spacingfloat, optional

The spacing between the rows of feature arrows/arcs as percentage of the plot radius.

arrow_head_lengthfloat, optional

The length of the arrow heads as percentage of the radius at which the respective arrow is plotted.

labelstr, optional

The central label of the plot. Ususally the plasmid name.

face_propertiesdict, optional

A dictionary of properties given to the patches that make up the feature arrows/arcs. Internally the arrow tail is a Matplotlib Rectangle, and the arrow head is a Polygon. For example this parameter could be used to add edge lines to the arrows/arcs.

label_propertiesdict, optional

A dictionary of properties given to the feature labels. Internally each feature label is one or multiple Matplotlib Text instances. For example this parameter could be used to set the font weight or size.

omit_oversized_labelsbool, optional

If true, a feature label will not be displayed, if the label is larger than its containing arc/arrow. This ensures, that labels from different features will not overlap each other. If false, the feature labels will always be displayed.

feature_formatterfunction, optional

A function that determines how each feature is displayed. The given function must take a Feature and must return the following tuple:

  • directional : bool

    True, if the direction of the feature should be indicated by an arrow. Otherwise, the feature is plotted is arc.

  • face_color : tuple or str, optional

    A Matplotlib compatible color for the feature arrow/arc.

  • label_color : tuple or str, optional

    A Matplotlib compatible color for the feature label.

  • label : str or None

    The label to be displayed for this feature. None, if no label should be displayed.