plot_alignment_type_based
#
- biotite.sequence.graphics.plot_alignment_type_based(axes, alignment, symbols_per_line=50, show_numbers=False, number_size=None, number_functions=None, labels=None, label_size=None, show_line_position=False, spacing=1, color_scheme=None, color_symbols=False, symbol_size=None, symbol_param=None, symbol_spacing=None)[source]#
Plot a pairwise or multiple sequence alignment coloring each symbol based on the symbol type.
This function works like
plot_alignment()
with aSymbolPlotter
, that colors the symbols based on a color scheme. The color intensity (or colormap value, respectively) of a symbol scales with similarity of the respective symbol to the other symbols in the same alignment column.- Parameters:
- axesAxes
A Matplotlib axes, that is used as plotting area.
- alignmentAlignment
The pairwise or multiple sequence alignment to be plotted. The alphabet of each sequence in the alignment must be the same.
- symbol_plotterSymbolPlotter
Defines how the symbols in the alignment are drawn.
- symbols_per_lineint, optional
The amount of alignment columns that are diplayed per line.
- show_numbersbool, optional
If true, the sequence position of the symbols in the last alignment column of a line is shown on the right side of the plot. If the last symbol is a gap, the position of the last actual symbol before this gap is taken. If the first symbol did not occur up to this point, no number is shown for this line. By default the first symbol of a sequence has the position 1, but this behavior can be changed using the number_functions parameter.
- number_sizefloat, optional
The font size of the position numbers
- number_functionslist of [(None or Callable(int -> int)], optional
By default the position of the first symbol in a sequence is 1, i.e. the sequence position is the sequence index incremented by 1. The behavior can be changed with this parameter: If supplied, the length of the list must match the number of sequences in the alignment. Every entry is a function that maps a sequence index (int) to a sequence position (int) for the respective sequence. A None entry means, that the default numbering is applied for the sequence.
- labelslist of str, optional
The sequence labels. Must be the same size and order as the sequences in the alignment.
- label_sizefloat, optional
Font size of the labels
- show_line_positionbool, optional
If true the position within a line is plotted below the alignment.
- spacingfloat, optional
The spacing between the alignment lines. 1.0 means that the size is equal to the size of a symbol box.
- color_schemestr or list of (tuple or str), optional
Either a valid color scheme name (e.g.
"flower"
,"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.
- symbol_sizefloat, optional
Font size of the sequence symbols.
- symbol_paramdict
Additional parameters that is given to the
matplotlib.Text
instance of each symbol.- symbol_spacingint, optional
А space is placed between each number of elements desired by variable.
See also
Gallery#

Fetching and aligning a protein from different species

Mutual information as measure for coevolution of residues

Multiple Structural alignment of orthologous proteins