ddmc.motifs¶
Helpers for mapping peptides to their surrounding sequence motif via a
reference proteome, and for loading kinase specificity profiles (PSPLs)
used by DDMC.predict_upstream_kinases.
ddmc.motifs ¶
Mapping to Uniprot's Proteome To Generate +/-5AA p-site Motifs.
Contains
get_proteome_name_to_seq: parses a UniProt FASTA proteome into a{protein name: sequence}dictionary; used byddmc.datasets.EBDT.get_pspls: loads kinase specificity profiles (position-specific peptide libraries) fromddmc/data/PSPL/, used byddmc.clustering.DDMC.predict_upstream_kinases.compute_control_pssm: builds a background PSSM from a set of sequences, used byddmc.clustering.DDMC.get_pssms.KinToPhosphotypeDict: maps each kinase named in the PSPL data set to the phosphoacceptor type(s) it targets (S/T or Y).make_motif,get_keys_by_value: helper utilities for motif slicing and reverse dictionary lookup.
KinToPhosphotypeDict
module-attribute
¶
KinToPhosphotypeDict = {
"ABL": "Y",
"AKT": "S/T",
"ALK": "Y",
"BLK": "Y",
"BRK": "Y",
"CK2": "S/T",
"ERK2": "S/T",
"FRK": "Y",
"HCK": "Y",
"INSR": "Y",
"LCK": "Y",
"LYN": "Y",
"MET": "Y",
"NEK1": "S/T",
"NEK2": "S/T",
"NEK3": "S/T",
"NEK4": "S/T",
"NEK5": "S/T",
"NEK6": "S/T",
"NEK7": "S/T",
"NEK8": "S/T",
"NEK9": "S/T",
"NEK10_S": "S/T",
"NEK10_Y": "Y",
"PKA": "S/T",
"PKC-theta": "S/T",
"PKD": "S/T",
"PLM2": "S/T",
"RET": "Y",
"SRC": "Y",
"TbetaRII": "S/T",
"YES": "Y",
"BRCA1": "S/T",
"AMPK": "S/T",
"CDK5": "S/T",
"CK1": "S/T",
"DMPK1": "S/T",
"EGFR": "Y",
"InsR": "Y",
"p38": "S/T",
"ERK1": "S/T",
"SHC1": "Y",
"SH2_PLCG1": "Y",
"SH2_INPP5D": "Y",
"SH2_SH3BP2": "Y",
"SH2_SHC2": "Y",
"SH2_SHE": "Y",
"SH2_Syk": "Y",
"SH2_TNS4": "Y",
"CLK2": "S/T",
"DAPK3": "S/T",
"ICK": "S/T",
"STK11": "S/T",
"MST1": "S/T",
"MST4": "S/T",
"PAK2": "S/T",
"Pim1": "S/T",
"Pim2": "S/T",
"SLK": "S/T",
"TGFbR2": "S/T",
"TLK1": "S/T",
"TNIK": "S/T",
"p70S6K": "S/T",
"EphA3": "Y",
}
get_proteome_name_to_seq ¶
get_proteome_name_to_seq(
X: IO[str], n: str
) -> dict[str, str]
Parse a UniProt FASTA proteome into a name-to-sequence dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
IO[str]
|
An open file handle to a UniProt FASTA file. |
required |
n
|
str
|
Which identifier to key the dictionary by: |
required |
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
Dictionary mapping protein name or gene symbol to its amino acid |
dict[str, str]
|
sequence. |
Source code in ddmc/motifs.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
get_pspls ¶
get_pspls(
source: Literal[
"kinome_atlas", "legacy"
] = "kinome_atlas",
) -> tuple[np.ndarray, np.ndarray]
Load kinase specificity profiles (PSPLs) bundled in ddmc/data/PSPL/.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Literal['kinome_atlas', 'legacy']
|
|
'kinome_atlas'
|
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
A tuple |
Source code in ddmc/motifs.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
compute_control_pssm ¶
compute_control_pssm(
bg_sequences: Sequence[str],
) -> np.ndarray
Build a background position-specific scoring matrix (PSSM) from a set
of (typically random/background) sequences, for use as the normalizing
background in ddmc.clustering.DDMC.get_pssms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bg_sequences
|
Sequence[str]
|
Length-11 background peptide sequences, e.g. from
|
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Array of shape (len(AAlist), 11) giving the log2 amino acid |
ndarray
|
enrichment at each position, normalized per-position across |
ndarray
|
residues. |
Source code in ddmc/motifs.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |