opentargets-skill

Query the Open Targets Platform GraphQL API for target, disease, and drug evidence summaries.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill opentargets-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opentargets-skill
Source: https://github.com/openai/plugins/tree/main/plugins/life-science-research/skills/opentargets-skill
Command: npx skills add https://github.com/openai/plugins --skill opentargets-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Researchers need quick, concise access to Open Targets Platform data on genes, diseases, drugs, and variants without writing and debugging raw GraphQL requests or parsing large API payloads by hand.

Core Features & Use Cases

  • Compact GraphQL Queries: Submit targeted Open Targets GraphQL requests for targets, diseases, drugs, variants, studies, and search, with automatic truncation of large nested results.
  • Associated-Disease Heatmaps: Build disease-by-datasource evidence matrices from datasourceScores for a given Ensembl gene ID, with optional disease-name filtering.
  • Use Case: Given the gene ENSG00000186868, generate a heatmap of associated diseases filtered to Alzheimer's-related terms, showing which datasources (GWAS, ClinVar, ChEMBL, etc.) support each association.

Quick Start

Ask the assistant to fetch Open Targets evidence for a gene or disease, for example: show the associated-disease datasource heatmap for ENSG00000186868 filtered to Alzheimer.

Frequently Asked Questions about opentargets-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query the Open Targets Platform API with GraphQL?

Send a JSON object with a `query` field (or `query_path` for long documents) to the opentargets_graphql.py script via stdin. It posts to the Open Targets v4 GraphQL endpoint and returns a compact summary with configurable `max_items` and `max_depth` truncation.

How do I build an associated-disease heatmap for a gene in Open Targets?

Run opentargets_disease_heatmap.py with an `ensembl_id`, optional `page_size`, `max_pages`, and `disease_name_filter`. It paginates `associatedDiseases`, collects `datasourceScores`, and returns a matrix of diseases by datasource with labeled columns.

What Python dependencies does the Open Targets GraphQL client need?

The scripts require only the `requests` package beyond the Python standard library. If requests is missing, the scripts return a `missing_dependency` error code instead of failing silently.

Can I save the full raw Open Targets API response instead of a truncated summary?

Yes, set `save_raw` to true and optionally provide `raw_output_path` in the input JSON. The full GraphQL response is written to that path, defaulting to /tmp/opentargets-graphql.json.

What are the limitations of the datasource heatmap scores?

The heatmap reflects evidence-source breadth from `datasourceScores`, not causal proof of target-disease association, mechanism, or direction of effect. It also paginates up to `max_pages`, so very large result sets may be truncated with a warning.