Ctd api

From aipoch/medical-research-skills · View interactive version

Ctd api is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Accesses Comparative Toxicogenomics Database (CTD) for chemical, gene, disease, and pathway interaction data. Invoke when user needs to query CTD, retrieve toxicogenomics data, or investigate chemical-disease relationships.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

Comparative Toxicogenomics Database (CTD) API

This skill allows you to query the Comparative Toxicogenomics Database (CTD) using the Batch Query API. You can retrieve curated and inferred associations between chemicals, diseases, genes, pathways, and phenotypes.

When to Use

Key Features

Dependencies

Example Usage

cd "20260316/scientific-skills/Evidence Insight/ctd-api"
python -m py_compile scripts/query_ctd.py
python scripts/query_ctd.py --help

Example run plan:

  1. Confirm the user input, output path, and any required config values.
  2. Edit the in-file CONFIG block or documented parameters if the script uses fixed settings.
  3. Run python scripts/query_ctd.py with the validated inputs.
  4. Review the generated output and return the final artifact with any assumptions called out.

Implementation Details

Capabilities

1. Batch Query

Retrieve data for a list of terms.

Script: scripts/query_ctd.py

Usage:

python scripts/query_ctd.py --inputType <type> --inputTerms <term1> <term2> ... --report <report_type> [--format <format>]

Parameters:

2. Direct Link Generation

To generate a URL for a specific entity (no script needed, just text generation):

Examples

Get curated genes associated with a chemical (e.g., Mercury):

python scripts/query_ctd.py --inputType chem --inputTerms "Mercury" --report genes_curated --format json

Get diseases associated with a gene (e.g., APP):

python scripts/query_ctd.py --inputType gene --inputTerms "APP" --report diseases_curated

References

See references/ctd_api_docs.md for a complete list of valid inputType and report combinations.

When Not to Use

Required Inputs

Recommended Workflow

  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

Output Contract

Validation and Safety Rules

Failure Handling

Quick Validation

Run this minimal verification path before full execution when possible:

python scripts/query_ctd.py --help

Expected output format:

Result file: ctd_api_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.