This repository contains the source code required to query translator for connections between genes and chemical compounds. The specific genes and chemical compounds were generated from an analysis of the Tox21 bioassay data. Tox21 chemical compounds were clustered based on their bioassay profiles. The compounds were annotated to show which gene products they have activity against. An enrichment analysis was applied to identify the key gene targets within each cluster. Then candidate compound-gene pairs were generated by connecting the enriched genes in a cluster to the other compounds within that cluster. To priotitize comound-gene pairs as hypothesese for follow up, we searched the translator for connections.
Learn more about the NCATS Biomedical Data Translator:
- https://ncats.nih.gov/translator
- https://smart-api.info/registry?tags=translator
- https://arax.ncats.io/
We provide a translator-query.yml file that defines the conda environment needed for this analysis.
conda env create -f translator-query.yml
A local python package, translatorpy, is provided for interfacing with translator. Install this package using pip:
pip install -e .
THe primary script for running the analysis is compound_target_candidate_search.py
python compound_target_candidate_search.py
This script directly queries translator and pipes the results into the Knowledge Graph Exchange format to enable easier downstream analysis.
Depending on the number of cores on your machines, this could take days. I would not suggest using more than 64 cores at once to avoid hammering the translator ARS system.
The translator querying script will leave a series of knowledge graph exchange formatted tsv files. Those files should be tidied up into one file for nodes and one file for edges.
python clean_kgx_files.py
Then the consolidate knowledge graph files can be loaded into neo4j. You should have an active neo4j database running on your local machine. On my laptop, I use the neo4j desktop version. On my cloud instances I like to use the neo4j docker image.
bash kgx-neo4j.sh