kinoml.core.proteins

MolecularComponent objects that represent protein-like entities.

Module Contents

kinoml.core.proteins.logger
class kinoml.core.proteins.Protein(pdb_id: str = '', molecule: openeye.oechem.OEMol | openeye.oechem.OEGraphMol | MDAnalysis.core.universe.Universe | None = None, toolkit: str = 'OpenEye', name: str = '', sequence: str = '', uniprot_id: str = '', ncbi_id: str = '', metadata: dict | None = None, **kwargs)

Bases: kinoml.core.components.BaseProtein, kinoml.core.sequences.AminoAcidSequence

Create a new Protein object. A molecular representation is accessible via the molecule attribute.

Examples

Create a protein from file with OpenEye toolkit molecular representation:

>>> protein = Protein.from_file("data/proteins/4f8o.pdb", name="4f8o")

Create a protein from file with MDAnalysis toolkit molecular representation:

>>> protein = Protein.from_file("data/proteins/4f8o.pdb", name="4f8o", toolkit="MDAnalysis")

Create a protein from an OpenEye molecule:

>>> from kinoml.modeling.OEModeling import read_molecules
>>> molecule = read_molecules("data/proteins/4f8o.pdb")[0]
>>> protein = Protein(molecule=molecule, name="4f8o")

Create a protein from PDB ID:

>>> protein = Protein.from_pdb("4f8o")

Create a protein from PDB ID with lazy instantiation:

>>> protein = Protein(pdb_id="4f8o")

Create a protein from PDB ID with lazy instantiation and get access to the complete wildtype amino acid sequence via providing a UniProt ID:

>>> protein = Protein(pdb_id="4f8o", uniprot_id="P31522")
>>> protein.sequence
_pdb_id = ''
_molecule = None
toolkit = 'OpenEye'
property pdb_id

Decorate pdb_id to modify setter.

property molecule

Decorate molecule to modify setter and getter.

classmethod from_file(file_path: pathlib.Path | str, name: str = '', toolkit: str = 'OpenEye')

Create a Protein from file.

Parameters:
  • file_path (pathlib.Path or str) – The path to the molecular file. Supported formats depend on the toolkit being used.

  • name (str, default="") – The name of the protein.

  • toolkit (str, default="OpenEye") – The toolkit to use for molecular representation.

classmethod from_pdb(pdb_id: str, name: str = '', toolkit: str = 'OpenEye')

Create a Protein from file.

Parameters:
  • pdb_id (str) – The PDB ID of the protein structure of interest.

  • name (str, default="") – The name of the protein.

  • toolkit (str, default="OpenEye") – The toolkit to use for molecular representation.

class kinoml.core.proteins.KLIFSKinase(pdb_id: str = '', molecule: openeye.oechem.OEMol | openeye.oechem.OEGraphMol | MDAnalysis.core.universe.Universe | None = None, toolkit: str = 'OpenEye', name: str = '', sequence: str = '', uniprot_id: str = '', ncbi_id: str = '', structure_klifs_id: int | None = None, kinase_klifs_id: int | None = None, kinase_klifs_sequence: str = '', structure_klifs_sequence: str = '', structure_klifs_residues: pandas.DataFrame | None = None, metadata: dict | None = None, **kwargs)

Bases: Protein

Create a new KLIFSKinase object. A molecular representation is accessible via the molecule attribute. Allows access to the sequence and residues of the KLIFS binding pocket.

Examples

Create a KLIFS kinase from PDB ID with lazy instantiation:

>>> kinase = KLIFSKinase(pdb_id="4yne")

Create a KLIFS kinase from PDB ID with lazy instantiation and gain access to the wildtype KLIFS pocket sequence via providing a UniProt ID:

>>> kinase = KLIFSKinase(pdb_id="4yne", uniprot_id="P04629")
>>> kinase.kinase_klifs_sequence()

Create a KLIFS kinase from PDB ID with lazy instantiation and gain access to the wildtype KLIFS pocket sequence via providing a KLIFS specifc kinase ID:

>>> kinase = KLIFSKinase(pdb_id="4yne", kinase_klifs_id=480)
>>> kinase.kinase_klifs_sequence()  # wildtype, does not need to match the given PDB structure

Create a KLIFS kinase from PDB ID with lazy instantiation and gain access to the KLIFS pocket sequence and residues of the structure via providing a KLIFS specifc structure ID:

>>> kinase = KLIFSKinase(pdb_id="4yne", structure_klifs_id=3620)
>>> kinase.kinase_klifs_sequence()  # wildtype, does not need to match the given PDB structure
>>> kinase.structure_klifs_sequence()  # specific to the structure
>>> kinase.structure_klifs_residues()  # specific to the structure
structure_klifs_id = None
kinase_klifs_id = None
_kinase_klifs_sequence = ''
_structure_klifs_sequence = ''
_structure_klifs_residues = None
_query_sequence_sources()

Query available sources for sequence details. Add additional methods below to allow fetching from other sources.

_query_klifs()

Query KLIFS for the Uniprot ID, which allows fetching of the sequence.

property kinase_klifs_sequence

Decorate kinase_klifs_sequence to modify setter and getter.

property structure_klifs_sequence

Decorate structure_klifs_sequence to modify setter and getter.

property structure_klifs_residues

Decorate structure_klifs_residues to modify setter and getter.