core

pdberellig.core.cofactors

Cofactors pipeline data model

class pdberellig.core.cofactors.Cofactors(log, args)

Cofactors pipeline data model.

get_representative(template_details)

Returns the representative molecule of a cofactor class

Parameters:

template_details (dict) – threshold and represeative details of cofactor class

Return type:

CompareObj

get_representative_similarity(query, representative)

Returns the similarity of query molecule to representative molecule of a cofactor class

Parameters:
  • query (CompareObj) – query molecule

  • representative (CompareObj) – representative molecule

Return type:

Similarity

get_similarity(ligand)

Returns the similarity of query molecule to template and representative molecules of cofactor class if it is above defined threshold

Parameters:

ligand (CompareObj) – CompareObj of ligand

Return type:

Union[CofactorSim, List]

process_entry()

Runs cofactor pipeline to check if a ligand acts a cofactor in the PDB :rtype: None

  • Calculates similarity to template molecules of cofactor classes

  • Calculates similarity to representative molecules of cofactor class

  • Checks if EC numbers associated with ligand interacting chains in the PDB has any overlap with EC numbers of cofactor classes

pdberellig.core.reactants

class pdberellig.core.reactants.Reactants(log, args)

Reactants pipeline data model.

get_reactant_annotation(ligand, uniprot_ids)

Returns PARITY similarity of the ligand to all reaction participants corresponding to the input list of uniprot ids * Fetches rhea_ids corresponding to all the reactions participated by the list of proteins (uniprot_ids) * Fetches ChEBI ids of reaction participants present in the list of reactions * Calculates PARITY similarity of input ligand to the list of ChEBI molecules

Parameters:
  • ligand (CompareObj) – CompareObj of ligand

  • uniprot_ids (list[str]) – list of uniprot_ids corresponding to the ligand interacting PDB chains

Return type:

DataFrame

get_reaction_participants(rhea_ids)

Fetches ChEBI ids of all the reaction participants corresponding to the input list of rhea_ids using Rhea sparql endpoint

Parameters:

rhea_ids (list[str]) – a list of rhea_ids

Return type:

DataFrame

Returns:

a dataframe of rhea_ids and chebi_ids

get_reactions(uniprot_ids)

Fetches rhea_ids of all the reactions corresponding to the input list of uniprot_ids using Uniprot sparql endpoint

Parameters:

uniprot_ids (list[str]) – a list of uniprot_ids

Return type:

DataFrame

Returns:

a datarame of uniprot_ids and rhea_ids

get_similarities(query, templates)

Returns PARITY similarity of query molecules to ChEBI structures present in the list of templates

Parameters:
  • query (CompareObj) – query molecule as a CompareObj

  • templates (list[CompareObj]) – list of COmpareObj of template molecules to compare

Return type:

dict[str, list[Union[str, float]]]

parse_chebi(chebi_ids)

Parse ChEBI mol files from chebi_structure_file using RDKit and return as a list of CompareObj. If the update option is enabled new structure file is downloaded from ChEBI FTP.

Parameters:

chebi_ids (list[str]) – list of chebi ids

Return type:

list[CompareObj]

Returns:

a list of CompareObj

process_entry()

Runs the pipeline for reactant-like annotation of the ligand and writes the results to tsv files :rtype: None

  • parses ligand cif file

  • fetches all ligand interacting PDB chains and corresponding uniprot ids

  • calculates similarity to reactant participants

pdberellig.core.drugs

Drugs pipeline data model

class pdberellig.core.drugs.Drugs(log, args)

Drugs pipeline data model

get_drugbank_targets(component)

Returns target information from DrugBank

Parameters:

component (Component) – Component object of ligand

Return type:

DataFrame