跳到正文
cccskills
免费在 GitHub 公开

query-opentarget

Query OpenTargets for drug targets, disease associations, and therapeutic evidence. Use when user asks about drug targets, disease mechanisms, target validation, or drug-disease associations. Triggers on "opentarget", "drug target", "target validation", "disease association", "therapeutic target", "drug for disease".

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

OpenTargets Platform Query

Query the OpenTargets Platform GraphQL API for drug-target-disease associations.

When to Use

  • User asks about drug targets for a disease
  • User wants disease-gene associations
  • User asks about drugs targeting a specific gene
  • User wants evidence for target validation

How to Execute

import requests
import json

OPENTARGETS_URL = "https://api.platform.opentargets.org/api/v4/graphql"

def query_opentargets(graphql_query, variables=None):
    payload = {"query": graphql_query, "variables": variables or {}}
    r = requests.post(OPENTARGETS_URL, json=payload, headers={"Content-Type": "application/json"})
    r.raise_for_status()
    return r.json()

# 1. Search for a target (gene)
def search_target(gene_name):
    query = '''
    query searchTarget($name: String!) {
      search(queryString: $name, entityNames: ["target"], page: {index: 0, size: 5}) {
        hits { id name description entity }
      }
    }'''
    return query_opentargets(query, {"name": gene_name})

# 2. Get diseases associated with a target
def target_diseases(ensembl_id, size=10):
    query = '''
    query targetDiseases($ensemblId: String!, $size: Int!) {
      target(ensemblId: $ensemblId) {
        id approvedSymbol approvedName
        associatedDiseases(page: {index: 0, size: $size}) {
          count
          rows { disease { id name } score
            datasourceScores { componentId score } }
        }
      }
    }'''
    return query_opentargets(query, {"ensemblId": ensembl_id, "size": size})

# 3. Get targets for a disease
def disease_targets(disease_id, size=10):
    query = '''
    query diseaseTargets($diseaseId: String!, $size: Int!) {
      disease(efoId: $diseaseId) {
        id name
        associatedTargets(page: {index: 0, size: $size}) {
          count
          rows { target { id approvedSymbol approvedName } score }
        }
      }
    }'''
    return query_opentargets(query, {"diseaseId": disease_id, "size": size})

# 4. Get drugs for a target
def target_drugs(ensembl_id):
    query = '''
    query targetDrugs($ensemblId: String!) {
      target(ensemblId: $ensemblId) {
        id approvedSymbol
        knownDrugs(size: 10) {
          count
          rows { drug { id name } mechanismOfAction phase status
            disease { id name } }
        }
      }
    }'''
    return query_opentargets(query, {"ensemblId": ensembl_id})

# 5. Search diseases
def search_disease(disease_name):
    query = '''
    query searchDisease($name: String!) {
      search(queryString: $name, entityNames: ["disease"], page: {index: 0, size: 5}) {
        hits { id name description entity }
      }
    }'''
    return query_opentargets(query, {"name": disease_name})

# Example: Find top drug targets for Alzheimer's
result = search_disease("Alzheimer")
hits = result.get("data", {}).get("search", {}).get("hits", [])
if hits:
    disease_id = hits[0]["id"]
    targets = disease_targets(disease_id, size=5)
    disease = targets.get("data", {}).get("disease", {})
    print(f"Disease: {disease.get('name')} ({disease.get('id')})")
    for row in disease.get("associatedTargets", {}).get("rows", []):
        t = row["target"]
        print(f"  {t['approvedSymbol']} ({t['approvedName']}) — score: {row['score']:.3f}")

Common Disease IDs (EFO)

  • Alzheimer's: EFO_0000249
  • Breast cancer: EFO_0000305
  • Type 2 diabetes: EFO_0001360
  • Parkinson's: EFO_0002508

Follow-up Suggestions

  • "Want me to check what drugs are in clinical trials for this target?"
  • "Should I look at the evidence breakdown by data source?"
  • "Want me to find the top genetic associations?"

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Workflow for read alignment, sorting, indexing, mapping statistics, and downstream-ready alignment artifacts.

中文简介正在准备中。当前显示原文说明。

BioTender-max/awesome-bio-agent-skills2042026年7月2日 更新

alphafold

免费

Validate protein designs using AlphaFold2 structure prediction. Use this skill when: (1) Validating designed sequences fold correctly, (2) Predicting binder-target complex structures, (3) Calculating confidence metrics (pLDDT, pTM, ipTM), (4) Self-consistency validation of designs, (5) Multi-chain complex prediction with AlphaFold-Multimer. For faster single-chain prediction, use esm. For QC thresholds, use protein-qc.

中文简介正在准备中。当前显示原文说明。

BioTender-max/awesome-bio-agent-skills2042026年7月2日 更新

AlphaFold2 / AlphaFold-Multimer structure prediction for validation and confidence scoring. Use this skill when: (1) Validating designed sequences fold correctly, (2) Predicting binder-target complex structures, (3) Calculating confidence metrics (pLDDT, pTM, ipTM), (4) Self-consistency validation of designs, (5) Multi-chain complex prediction with AlphaFold-Multimer. For faster single-chain prediction, use esm2-sequence-scoring. For QC thresholds, use protein-design-qc.

中文简介正在准备中。当前显示原文说明。

BioTender-max/awesome-bio-agent-skills2042026年7月2日 更新

Workflow for event-level and isoform-level splicing analysis with sashimi-ready outputs and splice QC.

中文简介正在准备中。当前显示原文说明。

BioTender-max/awesome-bio-agent-skills2042026年7月2日 更新

atac-seq

免费

ATAC-seq processing with assay QC, MACS3 peak calling, consensus peak matrices, differential accessibility, and motif or footprint follow-up.

中文简介正在准备中。当前显示原文说明。

BioTender-max/awesome-bio-agent-skills2042026年7月2日 更新

bindcraft

免费

End-to-end binder design using BindCraft hallucination. Use this skill when: (1) Designing protein binders with built-in AF2 validation, (2) Running production-quality binder campaigns, (3) Using different design protocols (fast, default, slow), (4) Need joint backbone and sequence optimization, (5) Want high experimental success rate. For backbone-only generation, use rfdiffusion. For QC thresholds, use protein-qc. For tool selection guidance, use binder-design.

中文简介正在准备中。当前显示原文说明。

BioTender-max/awesome-bio-agent-skills2042026年7月2日 更新

查看 BioTender-max 的全部技能

报告此技能的问题