biotite.sequence.graphics

A subpackage for visualization of sequence related objects.

The visualizations make use of Matplotlib for plotting. Therefore, each plotting function requires an Axes object, where the visualization should be performed.

The resulting plots are customizable: Labels, location numbers, etc. are usually placed into the axes tick labels, making tham accessible for modification via the usual Matplotlib API. Some aspects of the plotting itself are also customizable: For example the plot_alignment() function uses a interchangable SymbolPlotter, that knows how to draw the symbols of an alignment. Similarily, the appearance of sequence features in the function plot_feature_map() is customized via FeaturePlotter objects.

Plotting functions

plot_feature_map

Plot a sequence annotation, by showing the range of each feature on one or multiple position depicting line(s).

plot_sequence_logo

Create a sequence logo.

plot_alignment

Plot a pairwise or multiple sequence alignment.

plot_alignment_similarity_based

Plot a pairwise or multiple sequence alignment highlighting the similarity per alignment column.

plot_alignment_type_based

Plot a pairwise or multiple sequence alignment coloring each symbol based on the symbol type.

plot_dendrogram

Plot a dendrogram from a (phylogenetic) tree.

Symbol plotters

SymbolPlotter

Subclasses of this abstract base class define how symbols in an alignment are drawn onto an Axes object.

LetterPlotter

This abstract SymbolPlotter is the most widely used one.

LetterSimilarityPlotter

This SymbolPlotter colors the symbols based on the similarity with the other symbols in the same column.

LetterTypePlotter

This SymbolPloter colors each symbol based on the general color of that symbol defined by a color scheme.

Feature plotters

FeaturePlotter

A FeaturePlotter is an object, that 'knows' how to draw a certain type of sequence feature onto a matplotlib.Axes.

CodingPlotter

A plotter for the CDS and gene features.

PromoterPlotter

A plotter for regulatory features with the promoter or TATA_box class.

TerminatorPlotter

A plotter for regulatory features with the terminator class.

RBSPlotter

A plotter for regulatory features with the ribosome_binding_site class.

MiscFeaturePlotter

A plotter that matches any feature.

Color schemes

load_color_scheme

Load a color scheme from a JSON file.

get_color_scheme

Get a color scheme by name and alphabet.

list_color_scheme_names

Get a list of available color scheme names for a given alphabet.

Miscellaneous

ArrayPlotter

This SymbolPlotter quantitatively decorates sequences alignments, with molecular recognition data obtained from e.g.

plot_alignment_array

Plot a pairwise sequence alignment using an ArrayPlotter instance.

plot_plasmid_map

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