mkt.databases.kincore
Parsing and harmonization of KinCore FASTA and CIF structure files, aligned to UniProt.
Reads KinCore FASTA and CIF files, extracts kinase-domain metadata, aligns KinCore sequences to UniProt, and harmonizes the FASTA- and CIF-derived records.
Module Attributes
List of FASTA keys for KinCore FASTA file. |
|
List of FASTA keys for KinCore FASTA file. |
|
Dictionary of KinCore parameters for FASTA files. |
|
Dictionary of KinCore groups to map to mkt.schema.kinase_schema.Group. |
|
List of CIF keys for KinCore CIF file. |
Functions
|
Align KinCore Human-PK.fasta to canonical Uniprot sequences. |
Extract all cif files from KinCore directory. |
|
Parse KinCore Human-PK.fasta file to extract information for KinaseInfo object. |
|
Harmonize KinCore FASTA/CIF files for af2/md and generate KinCore objects. |
|
|
Parse fasta description to extract metadata. |
|
|
Update original CIF file with new coordinates post-alignment. |
- mkt.databases.kincore.DICT_GROUP_KINCORE = {'AGC': 'AGC', 'CAMK': 'CAMK', 'CK1': 'CK1', 'CMGC': 'CMGC', 'NEK': 'NEK', 'OTHER': 'Other', 'RGC': 'RGC', 'STE': 'STE', 'TKL': 'TKL', 'TYR': 'TK'}
Dictionary of KinCore groups to map to mkt.schema.kinase_schema.Group.
- Type:
dict[str, str]
- mkt.databases.kincore.DICT_KINCORE_PARAMS = {'af2': {'LIST_FASTA_KEYS': ['seq', 'group', 'hgnc1', 'swissprot', 'hgnc2', 'uniprot', 'start_md', 'end_md', 'length_md', 'start_af2', 'end_af2', 'length_af2', 'length_uniprot', 'source_file'], 'bool_af2': True, 'filename': 'AF2-active.fasta', 'study': 'Faezov-Dunbrack_2023'}, 'md': {'LIST_FASTA_KEYS': ['seq', 'group', 'hgnc1', 'start_md', 'end_md', 'swissprot', 'hgnc2', 'uniprot', 'source_file'], 'bool_af2': False, 'filename': 'Human-PK.fasta', 'study': 'Modi-Dunbrack_2019'}}
Dictionary of KinCore parameters for FASTA files.
- Type:
dict[str, dict[str, str | list[str]]]
- mkt.databases.kincore.LIST_CIF_KEYS = ['cif', 'group', 'hgnc', 'min_aloop_pLDDT', 'template_source', 'msa_size', 'msa_source', 'model_no']
List of CIF keys for KinCore CIF file.
- Type:
list[str]
- mkt.databases.kincore.LIST_FASTA_KEYS1 = ['seq', 'group', 'hgnc1', 'swissprot', 'hgnc2', 'uniprot', 'start_md', 'end_md', 'length_md', 'start_af2', 'end_af2', 'length_af2', 'length_uniprot', 'source_file']
List of FASTA keys for KinCore FASTA file.
- Type:
list[str]
- mkt.databases.kincore.LIST_FASTA_KEYS2 = ['seq', 'group', 'hgnc1', 'start_md', 'end_md', 'swissprot', 'hgnc2', 'uniprot', 'source_file']
List of FASTA keys for KinCore FASTA file.
- Type:
list[str]
- mkt.databases.kincore.align_kincore2uniprot(str_kincore: str, str_uniprot: str) dict[str, dict[str, str | int | list[int] | None]][source]
Align KinCore Human-PK.fasta to canonical Uniprot sequences.
- Parameters:
str_kicore (str) – KinCore sequence
str_uniprot (str) – Uniprot sequence
- Returns:
Dictionary of {start : int | None, end : int, mismatch : list[int]}
- Return type:
dict[str, dict[str, str | None]]
- mkt.databases.kincore.extract_pk_cif_files_as_list() list[KinCoreCIF][source]
Extract all cif files from KinCore directory.
- Returns:
List of KinCoreCIF objects
- Return type:
list[KinCoreCIF]
- mkt.databases.kincore.extract_pk_fasta_info_as_list(study: str) list[KinCoreFASTA][source]
Parse KinCore Human-PK.fasta file to extract information for KinaseInfo object.
- Parameters:
study (str) – Study FASTA to use; options are “af2” (Faezov-Dunbrack, 2023) or “md” (Modi-Dunbrack, 2019)
- Returns:
List of KinCoreFASTA objects
- Return type:
list[KinCoreFASTA]
- mkt.databases.kincore.harmonize_kincore_fasta_cif()[source]
Harmonize KinCore FASTA/CIF files for af2/md and generate KinCore objects.
- Returns:
Dictionary of {uniprot : list[KinCore]}
- Return type:
dict[str, list[KinCore]]
- mkt.databases.kincore.parse_fasta_description(str_description: str, bool_af2: bool = True) dict[str, str | int][source]
Parse fasta description to extract metadata.
- Parameters:
str_description (str) – Description from fasta file
- Returns:
Dictionary of metadata
- Return type:
dict[str, str]
- mkt.databases.kincore.update_original_cif_with_new_coords(str_orig: str, str_updated: str, str_filepath: str) None[source]
Update original CIF file with new coordinates post-alignment.
- Parameters:
str_orig (str) – Path to original tar.gz CIF file
str_updated (str) – Path to updated tar.gz CIF file
str_filepath (str) – Path to save updated CIF tar.gz file
- Returns:
None
- Return type:
None