mkt.schema.kinase_schema.KinaseInfo

class mkt.schema.kinase_schema.KinaseInfo(*, hgnc_name: str, uniprot_id: ~typing.Annotated[str, ~pydantic.types.StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^[A-Z][0-9][A-Z0-9]{3}[0-9](_[12])?(_[12])?$)] | ~typing.Annotated[str, ~pydantic.types.StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^[A-Z][0-9][A-Z][A-Z0-9]{2}[0-9][A-Z][A-Z0-9]{2}[0-9](_[12])?(_[12])?$)], uniprot: ~mkt.schema.kinase_schema.UniProt, kinhub: ~mkt.schema.kinase_schema.KinHub | None = None, klifs: ~mkt.schema.kinase_schema.KLIFS | None = None, pfam: ~mkt.schema.kinase_schema.Pfam | None = None, kincore: ~mkt.schema.kinase_schema.KinCore | None = None, KLIFS2UniProtIdx: dict[str, int | None] | None = None, KLIFS2UniProtSeq: dict[str, str | None] | None = None)[source]

Bases: BaseModel

Pydantic model for kinase information at the level of the kinase domain.

__init__(**data: Any) None

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Methods

_klifs_uniprot_idx_bounds()

Return the min and max non-None UniProt indices in KLIFS2UniProtIdx.

_reconcile_kd_bound_with_klifs(bound, ...)

Reconcile an adjudicated kinase domain bound with the KLIFS pocket.

adjudicate_group([bool_verbose])

Adjudicate group based on available data.

adjudicate_kd_end([int_max_gap, bool_verbose])

Adjudicate kinase domain end based on available data.

adjudicate_kd_sequence([bool_verbose])

Adjudicate kinase domain sequence based on available data.

adjudicate_kd_start([int_max_gap, bool_verbose])

Adjudicate kinase domain start based on available data.

check_molecular_brake_against_canonical()

Check this kinase's molecular brake residues against the canonical identities.

extract_sequence_from_cif([bool_verbose])

Extract sequence from CIF if available.

is_lipid_kinase()

Return boolean if a lipid kinase.

is_pseudogene()

Return boolean if a pseudogene.

is_pseudokinase()

Return boolean if a (predicted) pseudokinase.

return_molecular_brake_residues()

Return this kinase's residues at the molecular brake KLIFS positions.

validate_klifs2uniprotidx(value)

Validate KLIFS2UniProtIdx dictionary to include all regions since TOML doesn't save None.

validate_klifs2uniprotseq(value)

Validate KLIFS2UniProtSeq dictionary to include all regions since TOML doesn't save None.

Attributes

hgnc_name

uniprot_id

uniprot

kinhub

klifs

pfam

kincore

KLIFS2UniProtIdx

KLIFS2UniProtSeq

KLIFS2UniProtIdx: dict[str, int | None] | None
KLIFS2UniProtSeq: dict[str, str | None] | None
_klifs_uniprot_idx_bounds() tuple[int, int] | None[source]

Return the min and max non-None UniProt indices in KLIFS2UniProtIdx.

Returns:

The (min, max) UniProt indices spanned by the KLIFS pocket if any are available, otherwise None.

Return type:

tuple[int, int] | None

_reconcile_kd_bound_with_klifs(bound: int, klifs_bound: int, is_start: bool, int_max_gap: int, bool_verbose: bool) int | None[source]

Reconcile an adjudicated kinase domain bound with the KLIFS pocket.

The KLIFS pocket should fall within the kinase domain, i.e. the minimum KLIFS index should be >= the kinase domain start and the maximum KLIFS index should be <= the kinase domain end. When this is violated, the gap is compared against int_max_gap: small gaps expand the bound to the KLIFS index, larger gaps return None since the mapping is unreliable.

Parameters:
  • bound (int) – The adjudicated kinase domain bound (start or end).

  • klifs_bound (int) – The corresponding KLIFS pocket bound (min for start, max for end).

  • is_start (bool) – Whether bound is the kinase domain start (True) or end (False).

  • int_max_gap (int) – Maximum allowed gap between the kinase domain bound and the KLIFS bound before the bound is treated as unreliable and None is returned.

  • bool_verbose (bool) – Whether to log verbose messages.

Returns:

The reconciled bound, expanded to the KLIFS index when the gap is within int_max_gap, otherwise None.

Return type:

int | None

adjudicate_group(bool_verbose: bool = False) str | None[source]

Adjudicate group based on available data.

Parameters:

bool_verbose (bool, optional) – Whether to log verbose messages, by default False.

Returns:

The group of the kinase if available, otherwise None.

Return type:

str | None

adjudicate_kd_end(int_max_gap: int = 15, bool_verbose: bool = False) int | None[source]

Adjudicate kinase domain end based on available data.

Parameters:
  • int_max_gap (int, optional) – Maximum allowed gap between the kinase domain end and the maximum KLIFS pocket index before the end is treated as unreliable and None is returned, by default 15.

  • bool_verbose (bool, optional) – Whether to log verbose messages, by default False.

Returns:

The end of the kinase domain if available, otherwise None.

Return type:

int | None

adjudicate_kd_sequence(bool_verbose: bool = False) str | None[source]

Adjudicate kinase domain sequence based on available data.

Parameters:

bool_verbose (bool, optional) – Whether to log verbose messages, by default False.

Returns:

The kinase domain sequence if available, otherwise None.

Return type:

str | None

adjudicate_kd_start(int_max_gap: int = 15, bool_verbose: bool = False) int | None[source]

Adjudicate kinase domain start based on available data.

Parameters:
  • int_max_gap (int, optional) – Maximum allowed gap between the kinase domain start and the minimum KLIFS pocket index before the start is treated as unreliable and None is returned, by default 15.

  • bool_verbose (bool, optional) – Whether to log verbose messages, by default False.

Returns:

The start of the kinase domain if available, otherwise None.

Return type:

int | None

check_molecular_brake_against_canonical() tuple[bool, bool, bool] | None[source]

Check this kinase’s molecular brake residues against the canonical identities.

Compares the residue at each molecular brake position (see return_molecular_brake_residues) against the conserved canonical residue in DICT_MOLECULAR_BRAKE. An unmapped position (None) is treated as not matching.

Returns:

One boolean per molecular brake position – in DICT_MOLECULAR_BRAKE order – indicating whether this kinase’s residue matches the canonical identity. Returns None when no KLIFS pocket mapping is available.

Return type:

tuple[bool, bool, bool] | None

extract_sequence_from_cif(bool_verbose: bool = False) str | None[source]

Extract sequence from CIF if available.

Parameters:

bool_verbose (bool, optional) – Whether to log verbose messages, by default False.

Returns:

The sequence from the CIF if available, otherwise None.

Return type:

str | None

hgnc_name: str
is_lipid_kinase() bool[source]

Return boolean if a lipid kinase.

Returns:

Whether or not is a lipid kinase

Return type:

bool

is_pseudogene() bool[source]

Return boolean if a pseudogene.

Returns:

Whether or not is a pseudogene

Return type:

bool

is_pseudokinase() bool[source]

Return boolean if a (predicted) pseudokinase.

Predicts catalytic deficiency from the KLIFS pocket by testing the three canonical catalytic residues – the VAIK beta3 lysine (III:17), the HRD catalytic aspartate (c.l:70) and the DFG aspartate (xDFG:81); a kinase missing any one is called a pseudokinase. The catalytic lysine may instead sit in beta2 (II:13) in the WNK family, which is accepted as present. Two hand-curated overrides correct the known failure modes of the heuristic (see LIST_PSEUDOKINASE_TRIAD_INTACT and LIST_PSEUDOKINASE_HEURISTIC_FALSE_POSITIVE in mkt.schema.constants for membership and citations). Returns False when no KLIFS pocket is available.

Returns:

Whether or not is a predicted pseudokinase

Return type:

bool

kincore: KinCore | None
kinhub: KinHub | None
klifs: KLIFS | None
pfam: Pfam | None
return_molecular_brake_residues() dict[str, str | None] | None[source]

Return this kinase’s residues at the molecular brake KLIFS positions.

The molecular brake is a network of conserved residues in the KLIFS pocket (see DICT_MOLECULAR_BRAKE in mkt.schema.constants for the region:idx labels and their canonical identities). This reads the residue at each of those positions from the KLIFS-to-UniProt index mapping, i.e. canonical_seq[KLIFS2UniProtIdx[label] - 1 + offset], where the per-position offset comes from DICT_MOLECULAR_BRAKE_OFFSET (the brake lysine sits one residue N-terminal to its VIII:79 KLIFS-aligned position).

Returns:

Dictionary mapping each molecular brake KLIFS region:idx label to the residue found at that position in this kinase, or None where the position is unmapped. Returns None entirely when no KLIFS pocket mapping is available (KLIFS2UniProtIdx is None).

Return type:

dict[str, str | None] | None

uniprot: UniProt
uniprot_id: StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^[A-Z][0-9][A-Z][A-Z0-9]{2}[0-9][A-Z][A-Z0-9]{2}[0-9](_[12])?(_[12])?$)]
classmethod validate_klifs2uniprotidx(value: dict[str, int | None] | None) dict[str, int | None] | None[source]

Validate KLIFS2UniProtIdx dictionary to include all regions since TOML doesn’t save None.

Parameters:

value (dict[str, int | None]) – Dictionary mapping KLIFS residue to UniProt indices.

Returns:

Dictionary mapping KLIFS residue to UniProt indices.

Return type:

dict[str, int | None]

classmethod validate_klifs2uniprotseq(value: dict[str, str | None] | None) dict[str, str | None] | None[source]

Validate KLIFS2UniProtSeq dictionary to include all regions since TOML doesn’t save None.

Parameters:

value (dict[str, str | None]) – Dictionary mapping KLIFS residue to UniProt residue.

Returns:

Dictionary mapping KLIFS residue to UniProt residue.

Return type:

dict[str, str | None]