biotite.sequence.graphics.LetterTypePlotter

class biotite.sequence.graphics.LetterTypePlotter(axes, alphabet, color_scheme=None, color_symbols=False, font_size=None, font_param=None)[source]

Bases: LetterPlotter

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

EXPERIMENTAL: Future API changes are probable.

Parameters
axesAxes

A Matplotlib axes, that is used as plotting area.

alphabetAlphabet

The alphabet of the alignment(s) to be plotted

color_schemestr or list of (tuple or str), optional

Either a valid color scheme name (e.g. "rainbow", "clustalx", blossom, etc.) or a list of Matplotlib compatible colors. The list length must be at least as long as the length of the alphabet used by the sequences.

color_symbolsbool, optional

If true, the symbols themselves are colored. If false, the symbols are black, and the boxes behind the symbols are colored.

font_sizefloat, optional

Font size of the sequence symbols.

font_paramdict, optional

Additional parameters that is given to the matplotlib.Text instance of each symbol.

get_color(alignment, column_i, seq_i)

Get the color of a symbol at a specified position in the alignment.

The symbol is specified as position in the alignment’s trace (trace[pos_i, seq_i]).

PROTECTED: Override when inheriting.

Parameters
alignmentAlignment

The respective alignment.

column_iint

The position index in the trace.

seq_iint

The sequence index in the trace.

Returns
colorobject

A Matplotlib compatible color used for the background or the symbol itself at the specifed position

plot_symbol(bbox, alignment, column_i, seq_i)

Get the color of a symbol at a specified position in the alignment.

The symbol is specified as position in the alignment’s trace (trace[pos_i, seq_i]).

Parameters
bboxBbox

The axes area to plot the symbol in

alignmentAlignment

The respective alignment.

column_iint

The position index in the trace.

seq_iint

The sequence index in the trace.