mkt.databases.plot._map_aligned_to_klifs_colors

mkt.databases.plot._map_aligned_to_klifs_colors(seq_aligned: str, seq_klifs_only: str, dict_aa_colors: dict[str, str], klifs_pos_colors: list[tuple[str, str]], gap_color: str = 'white') list[str][source]

Map each position in an aligned sequence to a color.

Core KLIFS pocket residues get their KLIFS region color; inter/intra MSA residues get alphabet palette colors; gaps get the gap color.

Parameters:

seq_alignedstr

Full aligned sequence (e.g. 970 chars).

seq_klifs_onlystr

KLIFS-residues-only sequence (85 chars).

dict_aa_colorsdict[str, str]

Amino acid to color mapping (alphabet palette).

klifs_pos_colorslist[tuple[str, str]]

Per-position (region_name, color) from _get_klifs_position_colors.

gap_colorstr

Color for gap characters.

Returns:

list[str]

Color string for each position in seq_aligned.