TCT.node_normalizer

This is a wrapper around the Node Normalizer API.

API docs: https://nodenorm.transltr.io/docs

TCT.node_normalizer.get_normalized_nodes(query: str | list[str], return_equivalent_identifiers: bool = False, **kwargs)[source]

A wrapper around the get_normalized_nodes api endpoint. Given a CURIE or a list of CURIEs, this returns a list of normalized identifiers.

Parameters:
querystr

Query CURIE

return_equivalent_identifiersbool

Whether or not to return a list of equivalent identifiers along with the TranslatorNode. Default: False

**kwargs

Other arguments to get_normalized_nodes (e.g. conflate for gene-protein conflation, drug_chemical_conflate for drug-chemical conflation)

Returns:
If query is a single CURIE, returns a single TranslatorNode.
If query is a list of CURIEs, a dict of CURIE id to TranslatorNode for every node in the query.

Examples

>>> get_normalized_nodes('MESH:D014867', return_equivalent_identifiers=False)
TranslatorNode(curie='CHEBI:15377', label='Water', types=['biolink:SmallMolecule', 'biolink:MolecularEntity', 'biolink:ChemicalEntity', 'biolink:PhysicalEssence', 'biolink:ChemicalOrDrugOrTreatment', 'biolink:ChemicalEntityOrGeneOrGeneProduct', 'biolink:ChemicalEntityOrProteinOrPolypeptide', 'biolink:NamedThing', 'biolink:PhysicalEssenceOrOccurrent'], synonyms=None, curie_synonyms=None)