mkt.databases.app.schema.PhosphositesConfig

class mkt.databases.app.schema.PhosphositesConfig(seq_align: SequenceAlignment, label_offset: float = 20.0, label_min_dist: float = 6.0, label_spring_strength: float = 0.0, label_size: int = 14, label_connector: bool = True, highlight_cartoon_transparency: float = 0.0, *, str_attr: str = 'Phosphosites')[source]

Bases: StructureConfig

Configuration for highlighting phosphosites in PyMOL.

__init__(seq_align: SequenceAlignment, label_offset: float = 20.0, label_min_dist: float = 6.0, label_spring_strength: float = 0.0, label_size: int = 14, label_connector: bool = True, highlight_cartoon_transparency: float = 0.0, *, str_attr: str = 'Phosphosites') None

Methods

__eq__(other)

Return self==value.

__init__(seq_align[, label_offset, ...])

__post_init__()

_generate_list_idx_from_dict_align_with_attr()

Generate list of 0-indexed attribute positions from dict_align.

generate_labels(list_idx)

Generate labels for highlighted residues.

generate_list_idx()

Generate list of 0-indexed positions for phosphosite residues.

generate_style_color_lists(list_idx)

Generate style and color lists for phosphosites.

return_list_cif_idx()

Return list of 0-indexed positions corresponding to the CIF sequence.

return_list_idx_intersect()

Return list of 0-indexed positions at intersection of CIF and attribute sequences.

return_list_intersect_color_style()

Generate the indices, styles, and colors for highlighting.

Attributes

__dataclass_fields__

__dataclass_params__

__match_args__

highlight_cartoon_transparency

Cartoon transparency applied to colored/highlighted residues (0 = opaque, 1 = invisible).

label_connector

Whether to draw leader/connector lines from each residue to its label.

label_min_dist

Minimum distance (angstroms) between labels for collision avoidance.

label_offset

Angstroms offset from CA for label pseudoatom placement.

label_size

Font size for residue labels.

label_spring_strength

Spring force pulling labels back toward ideal position (0 = no spring).

str_attr

'Phosphosites').

seq_align

SequenceAlignment object providing kinase info and dict_align.

list_idx

List of 1-indexed residue positions to be highlighted, generated in __post_init__.

list_color

List of colors for the residues to be highlighted, generated in __post_init__.

list_style

List of styles for the residues to be highlighted, generated in __post_init__.

list_label

List of labels for the residues to be highlighted (None for no label).

__init__(seq_align: SequenceAlignment, label_offset: float = 20.0, label_min_dist: float = 6.0, label_spring_strength: float = 0.0, label_size: int = 14, label_connector: bool = True, highlight_cartoon_transparency: float = 0.0, *, str_attr: str = 'Phosphosites') None
generate_list_idx() list[int][source]

Generate list of 0-indexed positions for phosphosite residues.

Returns:

List of 0-indexed positions for the residues to be highlighted.

Return type:

list[int]

generate_style_color_lists(list_idx: list[int]) tuple[list[str], list[str]][source]

Generate style and color lists for phosphosites.

Parameters:

list_idx (list[int]) – List of 0-indexed residue positions.

Returns:

All residues get ‘stick’ style and ‘red’ color.

Return type:

tuple[list[str], list[str]]

list_color: list[str]

List of colors for the residues to be highlighted, generated in __post_init__.

list_idx: list[int]

List of 1-indexed residue positions to be highlighted, generated in __post_init__.

list_label: list[str | None]

List of labels for the residues to be highlighted (None for no label).

list_style: list[str]

List of styles for the residues to be highlighted, generated in __post_init__.

seq_align: SequenceAlignment

SequenceAlignment object providing kinase info and dict_align.

str_attr: str = 'Phosphosites'

‘Phosphosites’).

Type:

Attribute to highlight in the structure (default