
Opentargets Database
Query Open Targets genetics and clinical evidence from an agent to rank target–disease links and druggability without hand-writing GraphQL.
Overview
Open Targets Database is an agent skill for the Idea phase that queries the Open Targets GraphQL API for genetics evidence, associations, and druggability via scripted subcommands.
Install
npx skills add https://github.com/google-deepmind/science-skills --skill opentargets-databaseWhat is this skill?
- Python helper `scripts/query_opentargets.py` with formatted, truncated API responses to limit context tokens
- Built-in subcommands: get-gwas-studies, get-study-credible-sets, get-qtl-credible-sets, get-l2g, get-target-druggability
- Global `--limit` (default 50) and `--page-size` (default 200) for array pagination control
- GraphQL access to genetics (GWAS/eQTL), pathways, animal models, and clinical trial evidence
- Disease EFO ID resolution via search-disease for downstream association queries
- Default array limit 50 and API page size 200 on the query script
- 9 named built-in subcommands for common Open Targets tasks
Adoption & trust: 544 installs on skills.sh; 1.7k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need credible target–disease and druggability evidence from Open Targets but manual GraphQL and huge JSON payloads waste agent context.
Who is it for?
Indie builders prototyping biotech research agents, target dashboards, or validation workflows that must call Open Targets repeatedly with consistent limits.
Skip if: Teams that only need a one-time lookup in the web UI or production ETL that should bypass the skill and use their own GraphQL client with full payloads.
When should I use this skill?
You need Open Targets association, GWAS, QTL, L2G, or druggability data while researching or implementing a bioinformatics integration.
What do I get? / Deliverables
Your agent runs documented subcommands through `query_opentargets.py` and returns truncated, formatted association and tractability results you can cite in research notes or downstream specs.
- Truncated Open Targets API responses from script subcommands
- Resolved EFO disease IDs from search-disease queries
Recommended Skills
Journey fit
Canonical shelf in Idea because the skill supports early target and disease discovery before product or pipeline commitments. Research subphase fits aggregated GWAS, QTL, L2G, and association lookups used in opportunity and hypothesis work.
How it compares
Use instead of ad-hoc GraphQL prompts when you want a fixed command surface and automatic response truncation for agent sessions.
Common Questions / FAQ
Who is opentargets-database for?
Solo and indie developers building science or health-tech agents who need Open Targets genetics, association, and druggability data inside Claude Code, Cursor, or similar tools.
When should I use opentargets-database?
During Idea research to search diseases by EFO ID, pull GWAS and credible sets, rank associated targets, or check druggability before you scope a bioinformatics feature or API integration.
Is opentargets-database safe to install?
Review the Security Audits panel on this Prism page for install counts, license, and any published audit results before running the script against live APIs in your environment.
SKILL.md
READMESKILL.md - Opentargets Database
# Open Targets GraphQL API Guide ## Overview The Open Targets Platform GraphQL API provides access to aggregated multi-modal evidence from genetics (GWAS/eQTL), pathways, animal models, and clinical trials. This data is used to rank target-disease associations, identify druggable genes, and discover known drugs. ## Querying the API To interact with the Open Targets API, use the provided Python script `scripts/query_opentargets.py`. This script handles API communication, formatting, and automatically truncates large responses to save context window tokens. ### Built-in Commands For common tasks, use the specialized subcommands provided by the script: - `get-gwas-studies <efo_id>`: Fetch GWAS studies for a disease. - `get-study-credible-sets <study_id>`: Fetch 95% credible sets for a study. - `get-qtl-credible-sets <variant_id>`: Fetch QTL credible sets for a variant. - `get-l2g <variant_id> [--study-id <study_id>]`: Get Locus-to-Gene (L2G) predictions. - `get-target-druggability <ensembl_id>`: Get tractability and safety data for a target. - `get-associated-targets <efo_id>`: Find target genes associated with a disease. - `get-associated-diseases <ensembl_id>`: Find diseases associated with a target. - `search-disease <query_string>`: Search for a disease to find its EFO ID. **Global Options:** - `--limit N`: Limits the number of items returned in arrays (default: 50). - `--page-size N`: Sets API pagination size (default: 200). ### Custom GraphQL Queries For complex queries or fields not covered by the built-in commands, use the `custom-query` subcommand: ```bash uv run scripts/query_opentargets.py custom-query \ 'query targetInfo($id: String!) { target(ensemblId: $id) { approvedSymbol biotype } }' \ --variables '{"id": "ENSG00000169083"}' ``` ## Core Entities & Identifiers When writing custom GraphQL queries, you will primarily interact with the following core entities defined in the schema: ### 1. Target (Gene/Protein) - **Identifier:** Ensembl ID (e.g., `ENSG00000169083`). **Do not use HGNC symbols directly**; you must map them to Ensembl IDs first. - **Root Queries:** `target(ensemblId: String!)`, `targets(ensemblIds: [String!]!)` - **Key Fields:** - `id`: Ensembl ID. - `approvedSymbol`, `approvedName`: Standard HGNC symbol and name. - `biotype`: Type of gene (e.g., protein_coding). - `associatedDiseases(...)`: Target-disease associations with scores. - `knownDrugs(...)`: Approved/investigational drugs targeting this gene. - `tractability`: Feasibility of targeting with therapeutic modalities. ### 2. Disease (or Phenotype) - **Identifier:** Experimental Factor Ontology (EFO) ID (e.g., `EFO_0000685`). - **Root Queries:** `disease(efoId: String!)`, `diseases(efoIds: [String!]!)` - **Key Fields:** - `id`: EFO ID. - `name`, `description`: Disease name and summary. - `synonyms`: Alternative names. - `associatedTargets(...)`: Targets associated with this disease, sortable by score. - `knownDrugs(...)`: Drugs indicated for this disease or currently in clinical trials. - `evidences(...)`: Specific pieces of evidence supporting target-disease associations. ### 3. Drug (or Clinical Candidate) - **Identifier:** ChEMBL ID (e.g., `CHEMBL112`). - **Root Queries:** `drug(chemblId: String!)`, `drugs(chemblIds: [String!]!)` - **Key Fields:** - `id`: ChEMBL ID. - `name`, `drugType`: Generic name and molecule type. - `isApproved`, `maximumClinicalTrialPhase`: Clinical status. - `mechanismsOfAction`: How the drug interacts with its target. - `indications`: Diseases the drug is indicated for. - `adverseEvents(...)`: Significant adverse events from FAERS. ### 4. Variant - **Identifier:** Format `CHROM_POS_REF_ALT` (e.g., `1_154426264_C_T`). Note: A `chr` prefix is automatically stripped by the CLI tool