pyKVFinder.calculate_frequencies

pyKVFinder.calculate_frequencies(residues: Dict[str, List[List[str]]]) Dict[str, Dict[str, Dict[str, int]]][source]

Calculate frequencies of residues and class of residues (R1, R2, R3, R4 and R5) for detected cavities.

Parameters:

residues (Dict[str, List[List[str]]]) – A dictionary with a list of interface residues for each detected cavity.

Returns:

frequencies – A dictionary with frequencies of residues and class for residues of each detected cavity.

Return type:

Dict[str, Dict[str, Dict[str, int]]]

Note

The cavity nomenclature is based on the integer label. The cavity marked with 2, the first integer corresponding to a cavity, is KAA, the cavity marked with 3 is KAB, the cavity marked with 4 is KAC and so on.

Note

The classes of residues are:

  • Aliphatic apolar (R1): Alanine, Glycine, Isoleucine, Leucine, Methionine, Valine.

  • Aromatic (R2): Phenylalanine, Tryptophan, Tyrosine.

  • Polar Uncharged (R3): Asparagine, Cysteine, Glutamine, Proline, Serine, Threonine.

  • Negatively charged (R4): Aspartate, Glutamate.

  • Positively charged (R5): Arginine, Histidine, Lysine.

  • Non-standard (RX): Non-standard residues.

Example

With the interface residues identified with constitutional, we can calculate residues and classes of residues frequencies:

>>> from pyKVFinder import calculate_frequencies
>>> residues
{'KAA': [['49', 'E', 'LEU'], ['50', 'E', 'GLY'], ['51', 'E', 'THR'], ['52', 'E', 'GLY'], ['53', 'E', 'SER'], ['54', 'E', 'PHE'], ['55', 'E', 'GLY'], ['56', 'E', 'ARG'], ['57', 'E', 'VAL'], ['70', 'E', 'ALA'], ['72', 'E', 'LYS'], ['74', 'E', 'LEU'], ['84', 'E', 'GLN'], ['87', 'E', 'HIS'], ['88', 'E', 'THR'], ['91', 'E', 'GLU'], ['104', 'E', 'VAL'], ['120', 'E', 'MET'], ['121', 'E', 'GLU'], ['122', 'E', 'TYR'], ['123', 'E', 'VAL'], ['127', 'E', 'GLU'], ['166', 'E', 'ASP'], ['168', 'E', 'LYS'], ['170', 'E', 'GLU'], ['171', 'E', 'ASN'], ['173', 'E', 'LEU'], ['183', 'E', 'THR'], ['184', 'E', 'ASP'], ['186', 'E', 'GLY'], ['187', 'E', 'PHE'], ['201', 'E', 'THR'], ['327', 'E', 'PHE']]}
>>> frequencies = calculate_frequencies(residues)
>>> frequencies
{'KAA': {'RESIDUES': {'ALA': 1, 'ARG': 1, 'ASN': 1, 'ASP': 2, 'GLN': 1, 'GLU': 4, 'GLY': 4, 'HIS': 1, 'LEU': 3, 'LYS': 2, 'MET': 1, 'PHE': 3, 'SER': 1, 'THR': 4, 'TYR': 1, 'VAL': 3}, 'CLASS': {'R1': 11, 'R2': 4, 'R3': 8, 'R4': 6, 'R5': 4, 'RX': 0}}}