TCT.translator_node

class TCT.translator_node.TranslatorAttribute(attribute_type_id: str, value: Any, value_type_id: str | None = None, original_attribute_name: str | None = None, value_url: str | None = None, attribute_source: str | None = None, description: str | None = None, attributes: list | None = None)[source]

Class that represents Translator node or edge attributes

Attributes:
attribute_source
attributes
description
original_attribute_name
value_type_id
value_url
class TCT.translator_node.TranslatorEdge(subject: str, object: str, predicate: str, sources: list | None = None, attributes: list[TranslatorAttribute] | None = None)[source]

Class that represents Translator edges.

Attributes:
attributes
sources
object: str

The obj (object) is a CURIE id for a node.

predicate: str

Predicates

subject: str

The subject is a CURIE id for a node.

class TCT.translator_node.TranslatorNode(curie: str, label: str | None = None, types: list[str] | None = None, synonyms: list[str] | None = None, curie_synonyms: list[str] | None = None, attributes: list[TranslatorAttribute] | None = None, taxa: list[str] | None = None)[source]

Class for Translator graph nodes.

Attributes:
attributes
categories
curie_synonyms
identifier

identifier is the CURIE id for the node.

label
synonyms
taxa
types

Methods

from_dict(data_dict[, return_synonyms])

Creates a TranslatorNode object from a data dict.

attributes: list[TranslatorAttribute] | None = None

List of node attributes (which are key-value pairs.

curie: str

CURIE identifier

curie_synonyms: list[str] | None = None

list of synonymous CURIE ids (in the same order as synonyms)

classmethod from_dict(data_dict: dict, return_synonyms=False)[source]

Creates a TranslatorNode object from a data dict.

property identifier

identifier is the CURIE id for the node.

label: str | None = None

human-readable name for the node

synonyms: list[str] | None = None

list of synonymous labels

taxa: list[str] | None = None

List of taxa for the given node (i.e. ‘NCBITaxon:9606’)

types: list[str] | None = None

list of biolink types