mkt.databases.conservation._repair_camkk1_pocket

mkt.databases.conservation._repair_camkk1_pocket(dict_kinase: dict) None[source]

Temporary shim: fix CAMKK1’s off-by-one KLIFS mapping in place.

The cached DICT_KINASE carries a mis-curated CAMKK1 (UniProt Q8N5S9) KLIFS mapping. These indices are read 1-based (residue == canonical_seq[idx - 1]), and every CAMKK1 entry is one too low – so each position lands on the residue before the intended one (e.g. I:1 -> Q instead of S, and the catalytic columns onto non-catalytic residues). The off-by-one is uniform, so we:

  • KLIFS2UniProtIdx: add 1 to every non-None entry. This realigns all positions, including the residues that flank the large alpha-C/beta-4 insert (II:13, IV:41, …) – a “shift each value to the preceding key” shortcut would mis-map exactly those, since the indices jump across the insert.

  • pocket_seq: rebuild from the corrected indices (canonical_seq[idx - 1]), restoring the catalytic III:17=K / c.l:70=D / xDFG:81=D.

  • KLIFS2UniProtSeq (keyed by full region, incl. inter-region inserts absent from the 85-position index): shift the gathered residue stream left by one and append the newly revealed trailing residue, skipping None regions.

Stopgap until the kinase dict is regenerated with the upstream root-cause fix; the mkt.databases change_wrong_klifs_pocket_seq override currently patches only pocket_seq upstream, so the regenerated indices will still need the root fix.

Parameters:

dict_kinase (dict) – The deserialized DICT_KINASE mapping, modified in place.

Return type:

None