Data Integrator (Python API)
|
Drugs associated with a protein. More...
Public Member Functions | |
def | __init__ (s, dbp) |
Constructor. More... | |
def | SetFilter (s, fltType, fltLst) |
Set a filter. More... | |
def | ClearFilter (s, fltType) |
Stop filtering of a certain filter type. More... | |
def | ClearFilters (s) |
Stop any filtering. More... | |
def | GetPossibleGroups (s) |
Get valid names for drug classes. More... | |
def | GetPossibleActions (s) |
Get valid names for mechanisms of drug interactions with partners. More... | |
def | GetPossibleAffectedOrganisms (s) |
Get valid organism names where the drug is targeting the drug partner. More... | |
def | GetPossibleBondTypes (s) |
Get valid names for drug-related function of drug partner. More... | |
def | GetPossibleKnownActions (s) |
Get valid tokens if knowledge exists on how the drug works. More... | |
def | GetDrugs (s, upAcc) |
Get drugs affecting a protein. More... | |
def | GetPartnersByDrugName (s, drugName) |
Get protein which are in physical contact with a drug. More... | |
Drugs associated with a protein.
Proteins are encoded by UniProt accession numbers, as they are reported by the DrugBank XML file. The class allows filtering for certain types of drugs and drug/protein relationships. (Proteins are always called 'partners' in DrugBank terms, and they differ between four types of drug related proteins, see container class CDrugPartnerPair for more information on this.
def cls.DrugBankAnnotation.CDrugBankAnnotation.__init__ | ( | s, | |
dbp | |||
) |
Constructor.
@param dbp Instance of cls.DrugBankParser.CDrugBankParser, loaded with data.
def cls.DrugBankAnnotation.CDrugBankAnnotation.ClearFilter | ( | s, | |
fltType | |||
) |
Stop filtering of a certain filter type.
fltType | One of the global variables defined here, DBFLT_* . |
def cls.DrugBankAnnotation.CDrugBankAnnotation.ClearFilters | ( | s | ) |
Stop any filtering.
def cls.DrugBankAnnotation.CDrugBankAnnotation.GetDrugs | ( | s, | |
upAcc | |||
) |
Get drugs affecting a protein.
Drugs are reported Based on the filters set by the method @ref SetFilter. If no filter has been set, all drugs assicated with the protein are reported. @param upAcc UniProtKB accession number, eg. 'P35372'. @return A list of drugs and their relationships to the protein in question, stored in an instance of CDrugPartnerPairList.
def cls.DrugBankAnnotation.CDrugBankAnnotation.GetPartnersByDrugName | ( | s, | |
drugName | |||
) |
Get protein which are in physical contact with a drug.
This interface is rather preliminary, since we do not use this direction of information flow. @param drugName (@c String) Drug name to be queried. @return A @c List of triplets, (cls.DrugBankPartner.CDrugBankPartner, cls.DrugBankDrug.CDrugBankDrug, cls.DrugBankDrug.CDrugBankDrugPartner) which are filtered by the currently active set of filter rules.
def cls.DrugBankAnnotation.CDrugBankAnnotation.GetPossibleActions | ( | s | ) |
Get valid names for mechanisms of drug interactions with partners.
@return (@c List) Drug action names, eg. 'inhibitor'.
def cls.DrugBankAnnotation.CDrugBankAnnotation.GetPossibleAffectedOrganisms | ( | s | ) |
Get valid organism names where the drug is targeting the drug partner.
List
) Organism names which are affected by a drug, eg. 'Humans and other mammals', or 'Human Herpes Virus'. def cls.DrugBankAnnotation.CDrugBankAnnotation.GetPossibleBondTypes | ( | s | ) |
Get valid names for drug-related function of drug partner.
This is implied in the schema file. @return (@c List) Partner types, eg. 'enzyme', 'transporter', etc.
def cls.DrugBankAnnotation.CDrugBankAnnotation.GetPossibleGroups | ( | s | ) |
Get valid names for drug classes.
These tokens are hard coded in the schema file. @return (@c List) Drug group names, eg. 'approved'.
def cls.DrugBankAnnotation.CDrugBankAnnotation.GetPossibleKnownActions | ( | s | ) |
Get valid tokens if knowledge exists on how the drug works.
These strings are listed in the schema file. @return (@c List) Drug/target specific knowledge names, eg. 'yes'.
def cls.DrugBankAnnotation.CDrugBankAnnotation.SetFilter | ( | s, | |
fltType, | |||
fltLst | |||
) |
Set a filter.
Briefly, filtering works as inclusive AND. There are multiple types of filters that can be applied, see @c DBFLT_* globals. First, if a filter is not set, then all data related to this filter type will be reported. Second, if a filter is set, only these drugs will be reported that are tagged with at least one (!) of the filter names set here. Third, a combination of filters is always a logical 'and'. @param fltType One of the global variables defined here, @c DBFLT_*. @param fltLst @c List of names to be filtered for. (If this is an empty list, the filter is disabled. Use ClearFilter for this, though.) @return @c False, if the @c fltType or @c fltLst included invalid data; @c True, otherwise.