Database clients (indra.databases
)¶
This module implements a number of clients for accessing and using resources from biomedical entity databases and other third-party web services that INDRA uses. Many of the resources these clients use are loaded from resource files in the indra.resources module, in many cases also providing access to web service endpoints.
identifiers.org mappings and URLs (indra.databases.identifiers
)¶
- indra.databases.identifiers.ensure_chebi_prefix(chebi_id)[source]¶
Return a valid CHEBI ID that has the appropriate CHEBI: prefix.
- indra.databases.identifiers.ensure_chembl_prefix(chembl_id)[source]¶
Return a valid CHEMBL ID that has the appropriate CHEMBL prefix.
- indra.databases.identifiers.ensure_prefix(db_ns, db_id, with_colon=True)[source]¶
Return a valid ID that has the given namespace embedded.
This is useful for namespaces such as CHEBI, GO or BTO that require the namespace to be part of the ID. Note that this function always ensures that the given db_ns is embedded in the ID and can handle the case whene it’s already present.
- Parameters
- indra.databases.identifiers.ensure_prefix_if_needed(db_ns, db_id)[source]¶
Return an ID ensuring a namespace prefix if known to be needed.
- indra.databases.identifiers.get_identifiers_ns(db_name)[source]¶
Map an INDRA namespace to an identifiers.org namespace when possible.
Example: this can be used to map ‘UP’ to ‘uniprot’.
- indra.databases.identifiers.get_identifiers_url(db_name, db_id)[source]¶
Return an identifiers.org URL for a given database name and ID.
- indra.databases.identifiers.get_ns_from_identifiers(identifiers_ns)[source]¶
“Return a namespace compatible with INDRA from an identifiers namespace.
For example, this function can be used to map ‘uniprot’ to ‘UP’.
- indra.databases.identifiers.get_ns_id_from_identifiers(identifiers_ns, identifiers_id)[source]¶
Return a namespace/ID pair compatible with INDRA from identifiers.
- indra.databases.identifiers.get_url_prefix(db_name)[source]¶
Return the URL prefix for a given namespace.
- indra.databases.identifiers.namespace_embedded(db_ns)[source]¶
Return true if this namespace requires IDs to have namespace embedded.
This function first maps the given namespace to an identifiers.org namespace and then checks the registry to see if namespaces need to be embedded in IDs. If yes, it returns True. If not, or the ID can’t be mapped to identifiers.org, it returns False
- indra.databases.identifiers.parse_identifiers_url(url)[source]¶
Retrieve database name and ID given the URL.
- Parameters
url (str) – An identifiers.org URL to parse.
- Returns
db_name (str) – An internal database name: HGNC, UP, CHEBI, etc. corresponding to the given URL.
db_id (str) – An identifier in the database.
Bioregistry mappings and URLs (indra.databases.bioregistry_client
)¶
This module implements a client for using namespace and identifiers information from the Bioregistry (bioregistry.io).
- indra.databases.bioregistry_client.ensure_prefix_if_needed(db_ns, db_id)[source]¶
Return an ID ensuring a namespace prefix if known to be needed.
- indra.databases.bioregistry_client.get_bioregistry_curie(db_ns, db_id)[source]¶
Return the Bioregistry CURIE for the given INDRA namespace and ID.
- indra.databases.bioregistry_client.get_bioregistry_prefix(db_ns)[source]¶
Return the prefix for the given INDRA namespace in Bioregistry.
- indra.databases.bioregistry_client.get_bioregistry_url(db_ns, db_id)[source]¶
Return the Bioregistry URL for the given INDRA namespace and ID.
- indra.databases.bioregistry_client.get_ns_from_bioregistry(bioregistry_prefix)[source]¶
Return the INDRA namespace for the given Bioregistry prefix.
HGNC client (indra.databases.hgnc_client
)¶
- indra.databases.hgnc_client.get_current_hgnc_id(hgnc_name)[source]¶
Return HGNC ID(s) corresponding to a current or outdated HGNC symbol.
- Parameters
hgnc_name (str) – The HGNC symbol to be converted, possibly an outdated symbol.
- Returns
If there is a single HGNC ID corresponding to the given current or outdated HGNC symbol, that ID is returned as a string. If the symbol is outdated and maps to multiple current IDs, a list of these IDs is returned. If the given name doesn’t correspond to either a current or an outdated HGNC symbol, None is returned.
- Return type
- indra.databases.hgnc_client.get_ensembl_id(hgnc_id)[source]¶
Return the Ensembl ID corresponding to the given HGNC ID.
- indra.databases.hgnc_client.get_entrez_id(hgnc_id)[source]¶
Return the Entrez ID corresponding to the given HGNC ID.
- indra.databases.hgnc_client.get_enzymes(hgnc_id)[source]¶
Return the EC codes corresponding to the given HGNC ID.
- indra.databases.hgnc_client.get_gene_type(hgnc_id)[source]¶
Return the locus type of the genve with the given HGNC ID.
See more under Locus type at https://www.genenames.org/help/symbol-report/#!/#tocAnchor-1-2
- indra.databases.hgnc_client.get_hgnc_entry(hgnc_id)[source]¶
Return the HGNC entry for the given HGNC ID from the web service.
- Parameters
hgnc_id (str) – The HGNC ID to be converted.
- Returns
xml_tree – The XML ElementTree corresponding to the entry for the given HGNC ID.
- Return type
ElementTree
- indra.databases.hgnc_client.get_hgnc_from_ensembl(ensembl_id)[source]¶
Return the HGNC ID corresponding to the given Ensembl ID.
- indra.databases.hgnc_client.get_hgnc_from_entrez(entrez_id)[source]¶
Return the HGNC ID corresponding to the given Entrez ID.
- indra.databases.hgnc_client.get_hgnc_from_mouse(mgi_id)[source]¶
Return the HGNC ID corresponding to the given MGI mouse gene ID.
- indra.databases.hgnc_client.get_hgnc_from_rat(rgd_id)[source]¶
Return the HGNC ID corresponding to the given RGD rat gene ID.
- indra.databases.hgnc_client.get_hgnc_id(hgnc_name)[source]¶
Return the HGNC ID corresponding to the given HGNC symbol.
- indra.databases.hgnc_client.get_hgnc_id_from_mgi_name(mgi_name)[source]¶
Return a HGNC ID for the human gene homologous to the given mouse gene.
The mouse gene name provided as input is assumed to be an MGI official symbol.
- indra.databases.hgnc_client.get_hgnc_name(hgnc_id)[source]¶
Return the HGNC symbol corresponding to the given HGNC ID.
- indra.databases.hgnc_client.get_hgnc_name_from_mgi_name(mgi_name)[source]¶
Return a HGNC name for the human gene homologous to the given mouse gene.
The mouse gene name provided as input is assumed to be an MGI official symbol.
- indra.databases.hgnc_client.get_hgncs_from_enzyme(ec_code)[source]¶
Return the HGNC ids associated with a given enzyme.
- indra.databases.hgnc_client.get_mouse_id(hgnc_id)[source]¶
Return the MGI mouse ID corresponding to the given HGNC ID.
- indra.databases.hgnc_client.get_rat_id(hgnc_id)[source]¶
Return the RGD rat ID corresponding to the given HGNC ID.
- indra.databases.hgnc_client.get_uniprot_id(hgnc_id)[source]¶
Return the UniProt ID corresponding to the given HGNC ID.
- indra.databases.hgnc_client.is_kinase(gene_name)[source]¶
Return True if the given gene name is a kinase.
- indra.databases.hgnc_client.is_phosphatase(gene_name)[source]¶
Return True if the given gene name is a phosphatase.
UniProt client (indra.databases.uniprot_client
)¶
ChEBI client (indra.databases.chebi_client
)¶
- indra.databases.chebi_client.get_chebi_entry_from_web(chebi_id)[source]¶
Return a ChEBI entry corresponding to a given ChEBI ID using a REST API.
- Parameters
chebi_id (str) – The ChEBI ID whose entry is to be returned.
- Returns
An ElementTree element representing the ChEBI entry.
- Return type
- indra.databases.chebi_client.get_chebi_id_from_cas(cas_id)[source]¶
Return a ChEBI ID corresponding to the given CAS ID.
- indra.databases.chebi_client.get_chebi_id_from_chembl(chembl_id)[source]¶
Return a ChEBI ID from a given ChEBML ID.
- indra.databases.chebi_client.get_chebi_id_from_hmdb(hmdb_id)[source]¶
Return the ChEBI ID corresponding to an HMDB ID.
- indra.databases.chebi_client.get_chebi_id_from_name(chebi_name)[source]¶
Return a ChEBI ID corresponding to the given ChEBI name.
- indra.databases.chebi_client.get_chebi_id_from_pubchem(pubchem_id)[source]¶
Return the ChEBI ID corresponding to a given Pubchem ID.
- indra.databases.chebi_client.get_chebi_name_from_id(chebi_id, offline=True)[source]¶
Return a ChEBI name corresponding to the given ChEBI ID.
- Parameters
- Returns
chebi_name – The name corresponding to the given ChEBI ID. If the lookup fails, None is returned.
- Return type
- indra.databases.chebi_client.get_chebi_name_from_id_web(chebi_id)[source]¶
Return a ChEBI name corresponding to a given ChEBI ID using a REST API.
- indra.databases.chebi_client.get_chembl_id(chebi_id)[source]¶
Return a ChEMBL ID from a given ChEBI ID.
- indra.databases.chebi_client.get_inchi_key(chebi_id)[source]¶
Return an InChIKey corresponding to a given ChEBI ID using a REST API.
- indra.databases.chebi_client.get_primary_id(chebi_id)[source]¶
Return the primary ID corresponding to a ChEBI ID.
Note that if the provided ID is a primary ID, it is returned unchanged.
- indra.databases.chebi_client.get_pubchem_id(chebi_id)[source]¶
Return the PubChem ID corresponding to a given ChEBI ID.
Cell type context client (indra.databases.context_client
)¶
- indra.databases.context_client.get_mutations(gene_names, cell_types)[source]¶
Return protein amino acid changes in given genes and cell types.
- Parameters
- Returns
res – A dictionary keyed by cell line, which contains another dictionary that is keyed by gene name, with a list of amino acid substitutions as values.
- Return type
- indra.databases.context_client.get_protein_expression(gene_names, cell_types)[source]¶
Return the protein expression levels of genes in cell types.
- Parameters
- Returns
res – A dictionary keyed by cell line, which contains another dictionary that is keyed by gene name, with estimated protein amounts as values.
- Return type
NDEx client (indra.databases.ndex_client
)¶
- indra.databases.ndex_client.create_network(cx_str, ndex_cred=None, private=True)[source]¶
Creates a new NDEx network of the assembled CX model.
To upload the assembled CX model to NDEx, you need to have a registered account on NDEx (http://ndexbio.org/) and have the ndex python package installed. The uploaded network is private by default.
- indra.databases.ndex_client.get_default_ndex_cred(ndex_cred)[source]¶
Gets the NDEx credentials from the dict, or tries the environment if None
- indra.databases.ndex_client.send_request(ndex_service_url, params, is_json=True, use_get=False)[source]¶
Send a request to the NDEx server.
- Parameters
ndex_service_url (str) – The URL of the service to use for the request.
params (dict) – A dictionary of parameters to send with the request. Parameter keys differ based on the type of request.
is_json (bool) – True if the response is in json format, otherwise it is assumed to be text. Default: False
use_get (bool) – True if the request needs to use GET instead of POST.
- Returns
res – Depending on the type of service and the is_json parameter, this function either returns a text string or a json dict.
- Return type
- indra.databases.ndex_client.set_style(network_id, ndex_cred=None, template_id=None)[source]¶
Set the style of the network to a given template network’s style
cBio portal client (indra.databases.cbio_client
)¶
- indra.databases.cbio_client.get_cancer_studies(study_filter=None)[source]¶
Return a list of cancer study identifiers, optionally filtered.
There are typically multiple studies for a given type of cancer and a filter can be used to constrain the returned list.
- indra.databases.cbio_client.get_cancer_types(cancer_filter=None)[source]¶
Return a list of cancer types, optionally filtered.
- Parameters
cancer_filter (Optional[str]) – A string used to filter cancer types. Its value is the name or part of the name of a type of cancer. Example: “melanoma”, “pancreatic”, “non-small cell lung”
- Returns
type_ids – A list of cancer types matching the filter. Example: for cancer_filter=”pancreatic”, the result includes “panet” (neuro-endocrine) and “paad” (adenocarcinoma)
- Return type
- indra.databases.cbio_client.get_case_lists(study_id)[source]¶
Return a list of the case set ids for a particular study.
TAKE NOTE the “case_list_id” are the same thing as “case_set_id” Within the data, this string is referred to as a “case_list_id”. Within API calls it is referred to as a ‘case_set_id’. The documentation does not make this explicitly clear.
- indra.databases.cbio_client.get_ccle_cna(gene_list, cell_lines)[source]¶
Return a dict of CNAs in given genes and cell lines from CCLE.
CNA values correspond to the following alterations
-2 = homozygous deletion
-1 = hemizygous deletion
0 = neutral / no change
1 = gain
2 = high level amplification
- indra.databases.cbio_client.get_ccle_lines_for_mutation(gene, amino_acid_change)[source]¶
Return cell lines with a given point mutation in a given gene.
Checks which cell lines in CCLE have a particular point mutation in a given gene and return their names in a list.
- Parameters
- Returns
cell_lines – A list of CCLE cell lines in which the given mutation occurs.
- Return type
- indra.databases.cbio_client.get_ccle_mrna(gene_list, cell_lines)[source]¶
Return a dict of mRNA amounts in given genes and cell lines from CCLE.
- indra.databases.cbio_client.get_ccle_mutations(gene_list, cell_lines, mutation_type=None)[source]¶
Return a dict of mutations in given genes and cell lines from CCLE.
This is a specialized call to get_mutations tailored to CCLE cell lines.
- Parameters
gene_list (list[str]) – A list of HGNC gene symbols to get mutations in
cell_lines (list[str]) – A list of CCLE cell line names to get mutations for.
mutation_type (Optional[str]) – The type of mutation to filter to. mutation_type can be one of: missense, nonsense, frame_shift_ins, frame_shift_del, splice_site
- Returns
mutations – The result from cBioPortal as a dict in the format {cell_line : {gene : [mutation1, mutation2, …] }}
Example: {‘LOXIMVI_SKIN’: {‘BRAF’: [‘V600E’, ‘I208V’]}, ‘SKMEL30_SKIN’: {‘BRAF’: [‘D287H’, ‘E275K’]}}
- Return type
- indra.databases.cbio_client.get_genetic_profiles(study_id, profile_filter=None)[source]¶
Return all the genetic profiles (data sets) for a given study.
Genetic profiles are different types of data for a given study. For instance the study ‘cellline_ccle_broad’ has profiles such as ‘cellline_ccle_broad_mutations’ for mutations, ‘cellline_ccle_broad_CNA’ for copy number alterations, etc.
- Parameters
study_id (str) – The ID of the cBio study. Example: ‘paad_icgc’
profile_filter (Optional[str]) – A string used to filter the profiles to return. Will be one of: - MUTATION - MUTATION_EXTENDED - COPY_NUMBER_ALTERATION - MRNA_EXPRESSION - METHYLATION The genetic profiles can include “mutation”, “CNA”, “rppa”, “methylation”, etc.
- Returns
genetic_profiles – A list of genetic profiles available for the given study.
- Return type
- indra.databases.cbio_client.get_mutations(study_id, gene_list, mutation_type=None, case_id=None)[source]¶
Return mutations as a list of genes and list of amino acid changes.
- Parameters
study_id (str) – The ID of the cBio study. Example: ‘cellline_ccle_broad’ or ‘paad_icgc’
gene_list (list[str]) – A list of genes with their HGNC symbols. Example: [‘BRAF’, ‘KRAS’]
mutation_type (Optional[str]) – The type of mutation to filter to. mutation_type can be one of: missense, nonsense, frame_shift_ins, frame_shift_del, splice_site
case_id (Optional[str]) – The case ID within the study to filter to.
- Returns
mutations – A tuple of two lists, the first one containing a list of genes, and the second one a list of amino acid changes in those genes.
- Return type
- indra.databases.cbio_client.get_num_sequenced(study_id)[source]¶
Return number of sequenced tumors for given study.
This is useful for calculating mutation statistics in terms of the prevalence of certain mutations within a type of cancer.
- indra.databases.cbio_client.get_profile_data(study_id, gene_list, profile_filter, case_set_filter=None)[source]¶
Return dict of cases and genes and their respective values.
- Parameters
study_id (str) – The ID of the cBio study. Example: ‘cellline_ccle_broad’ or ‘paad_icgc’
gene_list (list[str]) – A list of genes with their HGNC symbols. Example: [‘BRAF’, ‘KRAS’]
profile_filter (str) – A string used to filter the profiles to return. Will be one of: - MUTATION - MUTATION_EXTENDED - COPY_NUMBER_ALTERATION - MRNA_EXPRESSION - METHYLATION
case_set_filter (Optional[str]) – A string that specifices which case_set_id to use, based on a complete or partial match. If not provided, will look for study_id + ‘_all’
- Returns
profile_data – A dict keyed to cases containing a dict keyed to genes containing int
- Return type
- indra.databases.cbio_client.send_request(**kwargs)[source]¶
Return a data frame from a web service request to cBio portal.
Sends a web service requrest to the cBio portal with arguments given in the dictionary data and returns a Pandas data frame on success.
More information about the service here: http://www.cbioportal.org/web_api.jsp
- Parameters
kwargs (dict) – A dict of parameters for the query. Entries map directly to web service calls with the exception of the optional ‘skiprows’ entry, whose value is used as the number of rows to skip when reading the result data frame.
- Returns
df – Response from cBioPortal as a Pandas DataFrame.
- Return type
pandas.DataFrame
ChEMBL client (indra.databases.chembl_client
)¶
- indra.databases.chembl_client.activities_by_target(activities)[source]¶
Get back lists of activities in a dict keyed by ChEMBL target id
- indra.databases.chembl_client.get_chembl_name(chembl_id)[source]¶
Return a standard ChEMBL name from an ID if available in the local resource.
- indra.databases.chembl_client.get_drug_inhibition_stmts(drug)[source]¶
Query ChEMBL for kinetics data given drug as Agent get back statements
- indra.databases.chembl_client.get_evidence(assay)[source]¶
Given an activity, return an INDRA Evidence object.
- Parameters
assay (dict) – an activity from the activities list returned by a query to the API
- Returns
ev – an
Evidence
object containing the kinetics of the- Return type
Evidence
- indra.databases.chembl_client.get_kinetics(assay)[source]¶
Given an activity, return its kinetics values.
- indra.databases.chembl_client.get_protein_targets_only(target_chembl_ids)[source]¶
Given list of ChEMBL target ids, return dict of SINGLE PROTEIN targets
- indra.databases.chembl_client.get_target_chemblid(target_upid)[source]¶
Get ChEMBL ID from UniProt upid
LINCS client (indra.databases.lincs_client
)¶
- class indra.databases.lincs_client.LincsClient[source]¶
Client for querying LINCS small molecules and proteins.
MeSH client (indra.databases.mesh_client
)¶
- indra.databases.mesh_client.get_db_mapping(mesh_id)[source]¶
Return mapping to another name space for a MeSH ID, if it exists.
- indra.databases.mesh_client.get_go_id(mesh_id)[source]¶
Return a GO ID corresponding to the given MeSH ID.
- indra.databases.mesh_client.get_mesh_id_from_db_id(db_ns, db_id)[source]¶
Return a MeSH ID mapped from another namespace and ID.
- indra.databases.mesh_client.get_mesh_id_from_go_id(go_id)[source]¶
Return a MeSH ID corresponding to the given GO ID.
- indra.databases.mesh_client.get_mesh_id_name(mesh_term, offline=False)[source]¶
Get the MESH ID and name for the given MESH term.
Uses the mappings table in indra/resources; if the MESH term is not listed there, falls back on the NLM REST API.
- Parameters
- Returns
Returns a 2-tuple of the form (id, name) with the ID of the descriptor corresponding to the MESH label, and the descriptor name (which may not exactly match the name provided as an argument if it is a Concept name). If the query failed, or no descriptor corresponding to the name was found, returns a tuple of (None, None).
- Return type
tuple of strs
- indra.databases.mesh_client.get_mesh_id_name_from_web(mesh_term)[source]¶
Get the MESH ID and name for the given MESH term using the NLM REST API.
- Parameters
mesh_term (str) – MESH Descriptor or Concept name, e.g. ‘Breast Cancer’.
- Returns
Returns a 2-tuple of the form (id, name) with the ID of the descriptor corresponding to the MESH label, and the descriptor name (which may not exactly match the name provided as an argument if it is a Concept name). If the query failed, or no descriptor corresponding to the name was found, returns a tuple of (None, None).
- Return type
tuple of strs
- indra.databases.mesh_client.get_mesh_name(mesh_id, offline=False)[source]¶
Get the MESH label for the given MESH ID.
Uses the mappings table in indra/resources; if the MESH ID is not listed there, falls back on the NLM REST API.
- Parameters
- Returns
Label for the MESH ID, or None if the query failed or no label was found.
- Return type
- indra.databases.mesh_client.get_mesh_name_from_web(mesh_id)[source]¶
Get the MESH label for the given MESH ID using the NLM REST API.
- indra.databases.mesh_client.get_mesh_tree_numbers(mesh_id)[source]¶
Return MeSH tree IDs associated with a MeSH ID from the resource file.
This function can handle supplementary concepts by first mapping them to primary terms and then collecting all the tree numbers for the mapped primary terms.
- indra.databases.mesh_client.get_mesh_tree_numbers_from_web(mesh_id)[source]¶
Return MeSH tree IDs associated with a MeSH ID from the web.
- indra.databases.mesh_client.get_primary_mappings(db_id)[source]¶
Return the list of primary terms a supplementary term is mapped to.
See https://www.nlm.nih.gov/mesh/xml_data_elements.html#HeadingMappedTo.
- indra.databases.mesh_client.has_tree_prefix(mesh_id, tree_prefix)[source]¶
Return True if the given MeSH ID has the given tree prefix.
- indra.databases.mesh_client.is_disease(mesh_id)[source]¶
Return True if the given MeSH ID is a disease.
- indra.databases.mesh_client.is_enzyme(mesh_id)[source]¶
Return True if the given MeSH ID is an enzyme.
GO client (indra.databases.go_client
)¶
A client to the Gene Ontology.
- indra.databases.go_client.get_go_id_from_label(label)[source]¶
Get ID corresponding to a given GO label.
- indra.databases.go_client.get_go_id_from_label_or_synonym(label)[source]¶
Get ID corresponding to a given GO label or synonym
- indra.databases.go_client.get_go_label(go_id)[source]¶
Get label corresponding to a given GO identifier.
- indra.databases.go_client.get_namespace(go_id)[source]¶
Return the GO namespace associated with a GO ID.
- indra.databases.go_client.get_primary_id(go_id)[source]¶
Get primary ID corresponding to an alternative/deprecated GO ID.
- indra.databases.go_client.get_valid_location(loc)[source]¶
Return a valid GO label based on an ID, label or synonym.
The rationale behind this function is that many sources produce cellular locations that are arbitrarily either GO IDs (sometimes without the prefix and sometimes outdated) or labels or synonyms. This function handles all these cases and returns a valid GO label in case one is available, otherwise None.
- Parameters
loc (txt) – The location that needst o be canonicalized.
- Returns
The valid location string is available, otherwise None.
- Return type
str or None
PubChem client (indra.databases.pubchem_client
)¶
- indra.databases.pubchem_client.get_inchi_key(pubchem_cid)[source]¶
Return the InChIKey for a given PubChem CID.
- indra.databases.pubchem_client.get_json_record(pubchem_cid)[source]¶
Return the JSON record of a given PubChem CID.
- indra.databases.pubchem_client.get_mesh_id(pubchem_cid)[source]¶
Return the MeSH ID for a given PubChem CID.
- indra.databases.pubchem_client.get_pmids(pubchem_cid)[source]¶
Return depositor provided PMIDs for a given PubChem CID.
Note that this information can also be obtained via PubMed at https://www.ncbi.nlm.nih.gov/sites/entrez?LinkName=pccompound_pubmed&db=pccompound&cmd=Link&from_uid=<pubchem_cid>.
miRBase client (indra.databases.mirbase_client
)¶
A client to miRBase.
- indra.databases.mirbase_client.get_hgnc_id_from_mirbase_id(mirbase_id)[source]¶
Return the HGNC ID corresponding to the given miRBase ID.
- indra.databases.mirbase_client.get_mirbase_id_from_hgnc_id(hgnc_id)[source]¶
Return the HGNC ID corresponding to the given miRBase ID.
- indra.databases.mirbase_client.get_mirbase_id_from_hgnc_symbol(hgnc_symbol)[source]¶
Return the HGNC gene symbol corresponding to the given miRBase ID.
- indra.databases.mirbase_client.get_mirbase_id_from_mirbase_name(mirbase_name)[source]¶
Return the miRBase identifier corresponding to the given miRBase name.
Experimental Factor Ontology (EFO) client (indra.databases.efo_client
)¶
A client to EFO.
Human Phenotype Ontology (HP) client (indra.databases.hp_client
)¶
A client to HP.
Disease Ontology (DOID) client (indra.databases.doid_client
)¶
A client to the Disease Ontology.
- indra.databases.doid_client.get_doid_id_from_doid_alt_id(doid_alt_id)[source]¶
Return the identifier corresponding to the given Disease Ontology alt id.
- indra.databases.doid_client.get_doid_id_from_doid_name(doid_name)[source]¶
Return the identifier corresponding to the given Disease Ontology name.
Infectious Disease Ontology client (indra.databases.ido_client
)¶
A client to OWL.
Taxonomy client (indra.databases.taxonomy_client
)¶
Client to access the Entrez Taxonomy web service.
DrugBank client (indra.databases.drugbank_client
)¶
Client for interacting with DrugBank entries.
- indra.databases.drugbank_client.get_chebi_id(drugbank_id)[source]¶
Return a mapping for a DrugBank ID to CHEBI.
- indra.databases.drugbank_client.get_chembl_id(drugbank_id)[source]¶
Return a mapping for a DrugBank ID to CHEMBL.
- indra.databases.drugbank_client.get_db_mapping(drugbank_id, db_ns)[source]¶
Return a mapping for a DrugBank ID to a given name space.
- indra.databases.drugbank_client.get_drugbank_id_from_chebi_id(chebi_id)[source]¶
Return DrugBank ID from a CHEBI ID.
- indra.databases.drugbank_client.get_drugbank_id_from_chembl_id(chembl_id)[source]¶
Return DrugBank ID from a CHEMBL ID.
Enyzme Class client (indra.databases.ec_client
)¶
A client to EC-code via an ontology client.
- indra.databases.ec_client.get_id_from_name(name)[source]¶
Return the enzyme class code corresponding to the given enzyme class name.
OBO client (indra.databases.obo_client
)¶
A client for OBO-sourced identifier mappings.
- class indra.databases.obo_client.OboClient(prefix)[source]¶
A base client for data that’s been grabbed via OBO
- class indra.databases.obo_client.OntologyClient(prefix)[source]¶
A base client class for OBO and OWL ontologies.
- get_id_from_alt_id(db_alt_id)[source]¶
Return the canonical database id corresponding to the alt id.
- get_id_from_name_or_synonym(txt)[source]¶
Return the database id corresponding to the given name or synonym.
Note that the way the OboClient is constructed, ambiguous synonyms are filtered out. Further, this function prioritizes names over synonyms (i.e., it first looks up the ID by name, and only if that fails, it attempts a synonym-based lookup). Overall, these mappings are guaranteed to be many-to-one.
OWL client (indra.databases.owl_client
)¶
A client for OWL-sourced identifier mappings.
Biolookup client (indra.databases.biolookup_client
)¶
A client to the Biolookup web service available at http://biolookup.io/.
- indra.databases.biolookup_client.get_name(db_ns, db_id)[source]¶
Return the name of a namespace and corresponding ID in the Biolookup web service.
MONDO client (indra.databases.mondo_client
)¶
A client to the Monarch Disease Ontology (MONDO).
- indra.databases.mondo_client.get_id_from_alt_id(mondo_alt_id)[source]¶
Return the identifier corresponding to the given MONDO alt id.
MGI client (indra.databases.mgi_client
)¶
A client for accessing MGI mouse gene data.
- indra.databases.mgi_client.get_id_from_name(name)[source]¶
Return an MGI ID from an MGI gene symbol.
- indra.databases.mgi_client.get_id_from_name_synonym(name_synonym)[source]¶
Return an MGI ID from an MGI gene symbol or synonym.
If the given name or synonym is the official symbol of a gene, its ID is returned. If the input is a synonym, it can correspond to one or more genes. If there is a single gene whose synonym matches the input, the ID is returned as a string. If multiple genes share the given synonym, their IDs are returned in a list. If the input doesn’t match any names or synonyms, None is returned.