pygtop.targets (Targets)¶
Contains target-specific objects and functions.
-
pygtop.targets.get_target_by_id(target_id)[source]¶ Returns a Target object of the target with the given ID.
Parameters: target_id (int) – The GtoP ID of the Target desired. Return type: TargetRaises: NoSuchTargetError: if no such target exists in the database
-
pygtop.targets.get_all_targets()[source]¶ Returns a list of all targets in the Guide to PHARMACOLOGY database. This can take a few seconds.
Returns: list of Targetobjects
-
pygtop.targets.get_targets_by(criteria)[source]¶ Get all targets which specify the criteria dictionary.
Parameters: criteria (dict) – A dictionary of field=value pairs. See the GtoP target web services page for key/value pairs which can be supplied. Returns: list of Targetobjects.
-
pygtop.targets.get_target_by_name(name)[source]¶ Returns the target which matches the name given.
Parameters: name (str) – The name of the target to search for. Note that synonyms will not be searched. Return type: TargetRaises: NoSuchTargetError: if no such target exists in the database.
-
pygtop.targets.get_target_family_by_id(family_id)[source]¶ Returns a TargetFamily object of the family with the given ID.
Parameters: family_id (int) – The GtoP ID of the TargetFamily desired. Return type: TargetFamilyRaises: NoSuchTargetFamilyError: if no such family exists in the database
-
pygtop.targets.get_all_target_families()[source]¶ Returns a list of all target families in the Guide to PHARMACOLOGY database.
Returns: list of TargetFamilyobjects
-
class
pygtop.targets.Target(json_data)[source]¶ A Guide to PHARMACOLOGY target object.
Parameters: json_data – A dictionary obtained from the web services. -
name(*args, strip_html=False, **kwargs)¶ Returns the target’s name.
Parameters: strip_html (bool) – If True, the name will have HTML entities stripped.Return type: str
-
abbreviation(*args, strip_html=False, **kwargs)¶ Returns the target’s abbreviated name.
Parameters: strip_html (bool) – If True, the abbreviation will have HTML entities stripped.Return type: str
-
systematic_name(*args, strip_html=False, **kwargs)¶ Returns the target’s systematic name.
Parameters: strip_html (bool) – If True, the name will have HTML entities stripped.Return type: str
-
family_ids()[source]¶ Returns the the family IDs of any families this target is a member of.
Returns: list of int
-
families()[source]¶ Returns a list of all target families of which this target is a member.
Returns: list of TargetFamilyobjects
-
subunit_ids()[source]¶ Returns the the target IDs of all targets which are subunits of this target.
Returns: list of int
-
subunits()[source]¶ Returns a list of all targets which are subunits of this target.
Returns: list of Targetobjects
-
complex_ids()[source]¶ Returns the the target IDs of all targets of which this target is a subunit.
Returns: list of int
-
complexes()[source]¶ Returns a list of all targets of which this target is a subunit.
Returns: list of Targetobjects
-
synonyms(*args, strip_html=False, **kwargs)¶ Returns any synonyms for this target.
Parameters: strip_html (bool) – If True, the synonyms will have HTML entities stripped.Returns: list of str
-
database_links(species=None)[source]¶ Returns any database links for this target.
Parameters: species (str) – If given, only links belonging to this species will be returned. Returns: list of DatabaseLinkobjects.
-
genes(species=None)[source]¶ Returns any genes for this target.
Parameters: species (str) – If given, only genes belonging to this species will be returned. Returns: list of Geneobjects.
-
interactions(species=None)[source]¶ Returns any interactions for this target.
Parameters: species (str) – If given, only interactions belonging to this species will be returned. Returns: list of Interactionobjects.
-
get_interaction_by_id(interaction_id)¶ Returns an Interaction object of a given ID belonging to the target.
Parameters: interaction_id (int) – The interactions’s ID. Return type: InteractionRaises: NoSuchInteractionError: if no such interaction exists in the database.
-
ligands(species=None)[source]¶ Returns any ligands that this target interacts with.
Parameters: species (str) – If given, only ligands belonging to this species will be returned. Returns: list of DatabaseLinkobjects.
-
gtop_pdbs(*args, as_molecupy=False, **kwargs)¶ Returns a list of PDBs which the Guide to PHARMACOLOGY says contain this target.
Parameters: as_molecupy (bool) – Returns the PDBs as molecuPy PDB objects. Returns: list of strPDB codes
-
uniprot_pdbs(*args, as_molecupy=False, **kwargs)¶ Queries the RSCB PDB database with the targets’s uniprot accessions.
Parameters: - as_molecupy (bool) –
Returns the PDBs as molecuPy PDB objects.
- species (str) – If given, only PDBs belonging to this species will be returned.
Returns: list of
strPDB codes- as_molecupy (bool) –
-
all_pdbs(*args, as_molecupy=False, **kwargs)¶ Get a list of PDB codes using all means available - annotated and external.
Parameters: - as_molecupy (bool) –
Returns the PDBs as molecuPy PDB objects.
- species (str) – If given, only PDBs belonging to this species will be returned.
Returns: list of
strPDB codes- as_molecupy (bool) –
-
-
class
pygtop.targets.TargetFamily(json_data)[source]¶ A Guide to PHARMACOLOGY target family object.
Parameters: json_data – A dictionary obtained from the web services. -
name(*args, strip_html=False, **kwargs)¶ Returns the family’s name.
Parameters: strip_html (bool) – If True, the name will have HTML entities stripped.Return type: str
-
target_ids()[source]¶ Returns the the target IDs of all targets in this family. Note that only immediate children are shown - if a family has subfamilies then it will not return any targets here - you must look in the sub-families.
Returns: list of int
-
targets()[source]¶ Returns a list of all targets in this family. Note that only immediate children are shown - if a family has subfamilies then it will not return any targets here - you must look in the sub-families.
Returns: list of Targetobjects
-
parent_family_ids()[source]¶ Returns the the target IDs of all target families of which this family is a member.
Returns: list of int
-
parent_families()[source]¶ Returns a list of all target families of which this family is a member.
Returns: list of TargetFamilyobjects
-
sub_family_ids()[source]¶ Returns the the target IDs of all arget families which are a member of this family.
Returns: list of int
-
sub_families()[source]¶ Returns a list of all target families which are a member of this family.
Returns: list of TargetFamilyobjects
-