Opentargets

From omar-A-hassan/medsci-agent · View interactive version

Opentargets is an AI agent skill from the GitHub repository omar-A-hassan/medsci-agent. Open Targets Platform for target-disease associations and genetic evidence

How to use this skill

Skill file

Open Targets Platform

Overview

Open Targets integrates genetics, genomics, transcriptomics, drugs, and literature to score target-disease associations. It uses evidence from GWAS, differential expression, pathways, drugs, and more.

GraphQL API

import requests
OT_URL = "https://api.platform.opentargets.org/api/v4/graphql"
query = """
query target($id: String!) {
  target(ensemblId: $id) {
    approvedSymbol
    approvedName
    associatedDiseases(page: {index: 0, size: 5}) {
      rows {
        disease { id name }
        score
        datatypeScores { componentId score }
      }
    }
  }
}
"""
r = requests.post(OT_URL, json={"query": query, "variables": {"id": "ENSG00000141510"}})
data = r.json()["data"]["target"]

Search

search_q = 'query search($q: String!) { search(queryString: $q, entityNames: ["target"], page: {index: 0, size: 5}) { hits { id name entity } } }'
r = requests.post(OT_URL, json={"query": search_q, "variables": {"q": "BRAF"}})

Key Details

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.