open-targets

Query the Open Targets Platform GraphQL API for gene-drug-disease associations, evidence scores, and therapeutic target validation. Use when the user needs disease associations for a gene, drug evidence for a target, or target prioritization for a disease. NOT for compound property lookup (use pubchem-compound), NOT for bioactivity measurements (use chembl-drug), NOT for protein 3D structures (use pdb-structure).

564 stars

Best use case

open-targets is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Query the Open Targets Platform GraphQL API for gene-drug-disease associations, evidence scores, and therapeutic target validation. Use when the user needs disease associations for a gene, drug evidence for a target, or target prioritization for a disease. NOT for compound property lookup (use pubchem-compound), NOT for bioactivity measurements (use chembl-drug), NOT for protein 3D structures (use pdb-structure).

Teams using open-targets should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/open-targets/SKILL.md --create-dirs "https://raw.githubusercontent.com/beita6969/ScienceClaw/main/skills/open-targets/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/open-targets/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How open-targets Compares

Feature / Agentopen-targetsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Query the Open Targets Platform GraphQL API for gene-drug-disease associations, evidence scores, and therapeutic target validation. Use when the user needs disease associations for a gene, drug evidence for a target, or target prioritization for a disease. NOT for compound property lookup (use pubchem-compound), NOT for bioactivity measurements (use chembl-drug), NOT for protein 3D structures (use pdb-structure).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Open Targets Platform Lookup

Query the Open Targets Platform GraphQL API to explore gene-drug-disease associations, evidence from genetic studies, known drugs, pathway data, and overall target validation scores.

## API Base URL

```
https://api.platform.opentargets.org/api/v4/graphql
```

All requests use HTTP POST with a JSON body containing `query` and optionally `variables`.

## API Endpoints

### Search Targets by Gene Symbol

```bash
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query { search(queryString: \"BRAF\", entityNames: [\"target\"], page: {size: 5, index: 0}) { total hits { id name entity description } } }"
  }' | python3 -m json.tool | head -40
```

### Get Target Details

Retrieve detailed information about a specific target by Ensembl gene ID:

```bash
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query { target(ensemblId: \"ENSG00000157764\") { id approvedSymbol approvedName biotype functionDescriptions subcellularLocations { location } } }"
  }' | python3 -m json.tool
```

### Get Disease Associations for a Target

Find diseases associated with a gene/target, ranked by overall association score:

```bash
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query { target(ensemblId: \"ENSG00000157764\") { approvedSymbol associatedDiseases(page: {size: 10, index: 0}) { count rows { disease { id name } score datatypeScores { id score } } } } }"
  }' | python3 -m json.tool | head -60
```

### Get Target Associations for a Disease

Find targets associated with a specific disease by EFO ID:

```bash
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query { disease(efoId: \"EFO_0000616\") { id name associatedTargets(page: {size: 10, index: 0}) { count rows { target { id approvedSymbol } score datatypeScores { id score } } } } }"
  }' | python3 -m json.tool | head -60
```

### Get Drug Evidence for a Target

Retrieve known drugs and clinical evidence for a target-disease pair:

```bash
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query { target(ensemblId: \"ENSG00000157764\") { approvedSymbol knownDrugs(page: {size: 10, index: 0}) { count rows { drug { id name mechanismsOfAction { rows { mechanismOfAction } } } phase status diseaseFromSource } } } }"
  }' | python3 -m json.tool | head -80
```

### Search Diseases

```bash
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query { search(queryString: \"melanoma\", entityNames: [\"disease\"], page: {size: 5, index: 0}) { total hits { id name entity description } } }"
  }' | python3 -m json.tool | head -40
```

## Evidence Types

The `datatypeScores` array contains scores for each evidence category:

- **genetic_association** -- GWAS and gene-burden analyses linking gene variants to disease
- **known_drug** -- approved or clinical-stage drugs with established target-disease evidence
- **affected_pathway** -- pathway-level evidence from Reactome and other pathway databases
- **somatic_mutation** -- cancer somatic mutation data from COSMIC, IntOGen, and others
- **literature** -- text-mined co-occurrences from Europe PMC literature
- **rna_expression** -- differential expression data from Expression Atlas
- **animal_model** -- phenotype evidence from mouse model knockouts (MGI, IMPC)

## Common Queries

```bash
# Resolve gene symbol to Ensembl ID
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{"query": "query { search(queryString: \"TP53\", entityNames: [\"target\"], page: {size: 1, index: 0}) { hits { id name } } }"}' | python3 -m json.tool

# Resolve disease name to EFO ID
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{"query": "query { search(queryString: \"breast cancer\", entityNames: [\"disease\"], page: {size: 1, index: 0}) { hits { id name } } }"}' | python3 -m json.tool

# Get drug details by ChEMBL ID
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
  -H "Content-Type: application/json" \
  -d '{"query": "query { drug(chemblId: \"CHEMBL941\") { id name drugType maximumClinicalTrialPhase mechanismsOfAction { rows { mechanismOfAction targets { id approvedSymbol } } } } }"}' | python3 -m json.tool
```

## Best Practices

1. Always resolve gene symbols to Ensembl IDs and disease names to EFO IDs before querying associations.
2. Use `page: {size: N, index: 0}` to control result counts; default pages can be large.
3. Filter by `datatypeScores` to focus on specific evidence types relevant to the research question.
4. Scores range from 0 to 1; values above 0.5 indicate strong association evidence.
5. Combine with ChEMBL skill for detailed bioactivity data on drugs found through Open Targets.
6. The API has no authentication requirement but rate limit to 10 requests per second.
7. Request only the fields you need to reduce response size and latency.

## Data Integrity Rule

NEVER fabricate database results from training data. Every protein ID, gene name, compound property, pathway ID, structure detail, and metadata MUST come from an actual API response in this conversation. If the API returns no results, errors, or partial data, report exactly what happened. Do not "fill in" missing data from memory or make up identifiers.

Related Skills

opentargets-database

564
from beita6969/ScienceClaw

Query Open Targets Platform for target-disease associations, drug target discovery, tractability/safety data, genetics/omics evidence, known drugs, for therapeutic target identification.

openhue

564
from beita6969/ScienceClaw

Control Philips Hue lights and scenes via the OpenHue CLI.

openalex-search

564
from beita6969/ScienceClaw

Open academic metadata via OpenAlex API. Use when: user needs author profiles, institution data, concept mapping, or open citation data. NOT for: full-text search or downloading papers.

openalex-database

564
from beita6969/ScienceClaw

Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.

openai-whisper

564
from beita6969/ScienceClaw

Local speech-to-text with the Whisper CLI (no API key).

openai-whisper-api

564
from beita6969/ScienceClaw

Transcribe audio via OpenAI Audio Transcriptions API (Whisper).

openai-image-gen

564
from beita6969/ScienceClaw

Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.

open-notebook

564
from beita6969/ScienceClaw

Self-hosted, open-source alternative to Google NotebookLM for AI-powered research and document analysis. Use when organizing research materials into notebooks, ingesting diverse content sources (PDFs, videos, audio, web pages, Office documents), generating AI-powered notes and summaries, creating multi-speaker podcasts from research, chatting with documents using context-aware AI, searching across materials with full-text and vector search, or running custom content transformations. Supports 16+ AI providers including OpenAI, Anthropic, Google, Ollama, Groq, and Mistral with complete data privacy through self-hosting.

xurl

564
from beita6969/ScienceClaw

A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.

xlsx

564
from beita6969/ScienceClaw

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

writing

564
from beita6969/ScienceClaw

No description provided.

world-bank-data

564
from beita6969/ScienceClaw

World Bank Open Data API for development indicators. Use when: user asks about GDP, population, poverty, health, or education statistics by country. NOT for: real-time financial data or stock prices.