Skip to main content

Introduction

What is TCT?

Translator Component Toolkit is a python library that allowing users to explore and use KGs in the Translator ecosystem. Users can check out the key function documentations here: https://ncatstranslator.github.io/Translator_component_toolkit/

TCT Github repo

Key features for TCT

Allowing users to select APIs, predicates according to the user's intention.
Parallel and fast querying of the selected APIs.
Providing reproducible results by setting constraints.
Faciliting to explore knowledge graphs from both Translator ecosystem and user defined APIs.
Connecting large language models to convert user's questions into TRAPI queries.
Find the identifier given a name using name resolver
Annotate a node using node annotator
Explore knowledge graphs in Translator
Find neighbors in the Translator KGs for a given node
Find paths between node A and node B in the Translator KG
Find a subnetwork given a list of nodes in the Translator KG
Developer-friendly wrappers for resolving labels/CURIEs, caching Translator resources, and returning parsed finder results
Connecting user's API with Translator API
Note: Visualization capabilities (pyvis, matplotlib, seaborn) can be installed separately via the vision extra.

How to use TCT

Install Requirements

To install TCT as a python library:

pip install TCT
# TCT is in development, to get the most recent update, user can install it through the github repo

This is the recommended approach for a minimal installation.

Visualization support is optional. Install it with the vision extra when you need the plotting and graph-rendering utilities:

pip install "TCT[vision]"

Development Installation

The TCT is continuously updated, if you would like to use the latest functions, you can clone this repository and install it in development mode:

Using pip: (recommended for development)

git clone https://github.com/NCATSTranslator/Translator_component_toolkit.git
cd Translator_component_toolkit
pip install -e .

Using UV :

git clone https://github.com/NCATSTranslator/Translator_component_toolkit.git
cd Translator_component_toolkit
uv sync

To include visualization support in the UV environment:

uv sync --extra vision

Building and Deployment

Using pip:

  • Build: python -m build
  • Install dependencies: pip install -e .

Using UV:

  • Build: uv build
  • Install dependencies: uv sync
  • Run in UV environment: uv run python your_script.py

Please follow the example notebooks (four utilities) below to explore the Translator APIs.

KG overview

Explore different KGs KG overview

Name Resolver and Node Normalizer

Example notebook for Name Resolver and Node Normalizer

Neighborhood finder

Example notebook for NeighborhoodFinder

Path finder

Example notebook for PathFinder

Network finder

Example notebook for NetworkFinder

Developer-friendly finder APIs

The finder notebooks above include quick-start sections using the developer-friendly pathfinder and neighborhood_finder APIs, now part of TCT's main API surface (from TCT import query_TCT_pathfinder, neighborhood_finder).

Use the detailed NeighborhoodFinder, PathFinder, NetworkFinder, KG overview, and visualization notebooks when you need more fine-grained endpoint selection, predicate control, raw query construction, parser workflows, or visualization setup.

Connecting to a user's API

API should be developed following the standard from TRAPI.
An example notebook for add a user's API can be found here.
Note: It does not work if no user' API is established

Visualize the results

After each pipeline, it will generate a result file for visualization. A user can use the Visualization html file to visulaize the results.

Key Translator components

Connecting to key Translator components can be found here

Contributing

TCT is a tool that helps to explore knowledge graphs developed in the Biomedical Data Translator Consortium. Consortium members and external contributors are encouraged to submit issues and pull requests.

Contact info

Guangrong Qin, guangrong.qin@isbscience.org

Metadata

Release files for TCT 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TCT 0.3.0
File Size Uploaded Provenance
tct-0.3.0.tar.gz 6.8 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for TCT 0.3.0
File Interpreter ABI Platform
tct-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 MB

Release files / tct-0.3.0.tar.gz

Download URL tct-0.3.0.tar.gz
Size 6.8 MB
Tags Source
SHA-256 checksum
How to use checksums
d4ba33476ea8db07092796a4b75431b753c6ca0dcb1d7ad4a1af3d929758610b
BLAKE2b-256 checksum
How to use checksums
1b144de798853edaa1461170edc41b6b00b55495f3ca63e5415cb15d3e373de1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.6

Release files / tct-0.3.0-py3-none-any.whl

Download URL tct-0.3.0-py3-none-any.whl
Size 59.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c28f9dc89d30102296e325b824376b965731ca3927765eefb37f698e4c640ed
BLAKE2b-256 checksum
How to use checksums
18e51dbe756cdbb03bb99fbea2993cf077de251d2adcd4dd28377c7836ddf2d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.6

Security for TCT 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page