mkt.databases.plot.SequenceAlignment
- class mkt.databases.plot.SequenceAlignment(list_sequences: list[str], list_ids: list[str], dict_colors: dict[str, str], font_size: int = 9, plot_width: int = 800, plot_height: int = None, bool_top: bool = True, bool_reverse: bool = True, bool_gridplot: bool = True)[source]
Bases:
objectClass for sequence alignment plot.
- __init__(*args: Any, **kwargs: Any) None
Methods
__eq__(other)Return self==value.
__post_init__()Generate sequence alignment plot adapted from https://dmnfarrell.github.io/bioinformatics/bokeh-sequence-aligner.
Generate sequence alignment gridplot.
Generate sequence alignment plot adapted from https://dmnfarrell.github.io/bioinformatics/bokeh-sequence-aligner.
get_colors(list_str, dict_colors)Get colors for residue in a given sequence.
Show sequence alignment plot via Bokeh in separate window.
Attributes
__dataclass_fields____dataclass_params____match_args____pydantic_config__Use gridplot or not.
Reverse the sequence or not.
Show entire sequence view on top or not (no text, with zoom).
Font size for alignment.
Height of the plot; default None and will full-page heuristic.
Width of the plot.
List of sequences to show in aligner.
List of sequence IDs.
Dictionary of colors for each sequence.
- bool_gridplot: bool = True
Use gridplot or not.
- bool_reverse: bool = True
Reverse the sequence or not.
- bool_top: bool = True
Show entire sequence view on top or not (no text, with zoom).
- dict_colors: dict[str, str]
Dictionary of colors for each sequence.
- font_size: int = 9
Font size for alignment.
- generate_bottom_plot() None[source]
Generate sequence alignment plot adapted from https://dmnfarrell.github.io/bioinformatics/bokeh-sequence-aligner.
- generate_top_plot() None[source]
Generate sequence alignment plot adapted from https://dmnfarrell.github.io/bioinformatics/bokeh-sequence-aligner.
- static get_colors(list_str: str, dict_colors: dict[str, str]) list[str][source]
Get colors for residue in a given sequence.
- Parameters:
list_str (str) – List of residues in a sequence.
dict_colors (dict[str, str]) – Dictionary of colors for each residue.
- Returns:
List of colors for each residue.
- Return type:
list[str]
- list_ids: list[str]
List of sequence IDs.
- list_sequences: list[str]
List of sequences to show in aligner.
- plot_height: int = None
Height of the plot; default None and will full-page heuristic.
- plot_width: int = 800
Width of the plot.