Skip to content

K-Dense-AI/scientific-agent-skills / skills/database-lookup

database-lookup

Verified

Queries documented public database APIs with explicit endpoints, filters, pagination, and provenance. Used when a scientific, regulatory, financial, or other database-backed fact must be retrieved reproducibly from a named source rather than inferred from general knowledge.

FileKindSize
SKILL.mdskill md26.9 KB
references/addgene.mdmarkdown1.7 KB
references/alphafold.mdmarkdown2.9 KB
references/alphavantage.mdmarkdown7.9 KB
references/bea.mdmarkdown14.3 KB
references/bindingdb.mdmarkdown2.9 KB
references/biogrid.mdmarkdown3.8 KB
references/bls.mdmarkdown9.1 KB
references/brenda.mdmarkdown2.9 KB
references/cbioportal.mdmarkdown7.4 KB
references/census.mdmarkdown9.0 KB
references/chebi.mdmarkdown3.5 KB
references/chembl.mdmarkdown2.7 KB
references/clinicaltrials.mdmarkdown3.4 KB
references/clinpgx.mdmarkdown1.5 KB
references/clinvar.mdmarkdown4.1 KB
references/cod.mdmarkdown3.0 KB
references/cosmic.mdmarkdown1.3 KB
references/dailymed.mdmarkdown1.8 KB
references/database_selection_guide.mdmarkdown10.0 KB
references/datacommons.mdmarkdown7.0 KB
references/dbsnp.mdmarkdown3.5 KB
references/disgenet.mdmarkdown1.4 KB
references/drugbank.mdmarkdown1.3 KB
references/ecb.mdmarkdown5.2 KB
references/emdb.mdmarkdown1.1 KB
references/ena.mdmarkdown9.9 KB
references/encode.mdmarkdown1.8 KB
references/ensembl.mdmarkdown14.0 KB
references/epa.mdmarkdown1.9 KB
references/eurostat.mdmarkdown7.3 KB
references/fda.mdmarkdown2.1 KB
references/federal-reserve.mdmarkdown6.7 KB
references/fred.mdmarkdown9.9 KB
references/gene-ontology.mdmarkdown4.4 KB
references/geo.mdmarkdown3.8 KB
references/gnomad.mdmarkdown3.5 KB
references/gtex.mdmarkdown4.1 KB
references/gwas-catalog.mdmarkdown1.6 KB
references/hca.mdmarkdown1.4 KB
references/hpo.mdmarkdown1.2 KB
references/human-protein-atlas.mdmarkdown1.2 KB
references/interpro.mdmarkdown3.4 KB
references/jaspar.mdmarkdown1.4 KB
references/kegg.mdmarkdown2.5 KB
references/lincs-l1000.mdmarkdown2.1 KB
references/materials-project.mdmarkdown4.8 KB
references/metabolomics-workbench.mdmarkdown3.8 KB
references/monarch.mdmarkdown1.5 KB
references/mousemine.mdmarkdown1.5 KB
references/myvariant.mdmarkdown1.3 KB
references/nasa-exoplanet-archive.mdmarkdown4.3 KB
references/nasa.mdmarkdown3.0 KB
references/ncbi-gene.mdmarkdown1.7 KB
references/ncbi-protein.mdmarkdown3.2 KB
references/ncbi-taxonomy.mdmarkdown3.7 KB
references/nist.mdmarkdown3.6 KB
references/noaa.mdmarkdown6.7 KB
references/omim.mdmarkdown3.4 KB
references/opentargets.mdmarkdown7.0 KB
references/openweathermap.mdmarkdown8.2 KB
references/pdb.mdmarkdown3.2 KB
references/pride.mdmarkdown1.4 KB
references/pubchem.mdmarkdown3.4 KB
references/quickgo.mdmarkdown1.5 KB
references/reactome.mdmarkdown2.9 KB
references/regulomedb.mdmarkdown2.0 KB
references/retrieval-contract.mdmarkdown7.2 KB
references/rummageo.mdmarkdown1.3 KB
references/sdss.mdmarkdown4.4 KB
references/sec-edgar.mdmarkdown8.3 KB
references/simbad.mdmarkdown12.3 KB
references/sra.mdmarkdown4.5 KB
references/string.mdmarkdown7.7 KB
references/tcga-gdc.mdmarkdown2.0 KB
references/treasury.mdmarkdown7.2 KB
references/ucsc-genome.mdmarkdown3.3 KB
references/uniprot.mdmarkdown7.1 KB
references/usgs.mdmarkdown9.9 KB
references/uspto.mdmarkdown4.6 KB
references/who.mdmarkdown8.7 KB
references/worldbank.mdmarkdown7.0 KB
references/zinc.mdmarkdown5.7 KB

references/opentargets.md

View on GitHub
# Open Targets Platform API

## Base URLs

**GraphQL API (primary, recommended):**
```
https://api.platform.opentargets.org/api/v4/graphql
```

**Important:** The GraphQL endpoint requires HTTP POST with `Content-Type: application/json`. WebFetch (GET-only) will not work — use `curl` via shell instead:
```bash
curl -s -X POST -H "Content-Type: application/json" \
  -d '{"query":"{ target(ensemblId: \"ENSG00000157764\") { approvedSymbol approvedName } }"}' \
  https://api.platform.opentargets.org/api/v4/graphql
```

## Authentication

No API key required. All endpoints are public.

## GraphQL API

All GraphQL queries are sent as POST requests to the GraphQL endpoint.

```
POST https://api.platform.opentargets.org/api/v4/graphql
Content-Type: application/json

{
  "query": "...",
  "variables": { ... }
}
```

### 1. Target information (by Ensembl Gene ID)

```graphql
query TargetInfo($ensemblId: String!) {
  target(ensemblId: $ensemblId) {
    id
    approvedSymbol
    approvedName
    biotype
    proteinIds {
      id
      source
    }
    tractability {
      label
      modality
      value
    }
    safetyLiabilities {
      event
      effects {
        direction
        dosing
      }
    }
    pathways {
      pathway
      pathwayId
    }
    functionDescriptions
    subcellularLocations {
      location
    }
  }
}
```

**Variables:** `{ "ensemblId": "ENSG00000141510" }`


---

### 2. Disease information (by EFO ID)

```graphql
query DiseaseInfo($efoId: String!) {
  disease(efoId: $efoId) {
    id
    name
    description
    therapeuticAreas {
      id
      name
    }
    synonyms {
      terms
    }
  }
}
```

**Variables:** `{ "efoId": "EFO_0000311" }` (cancer)


---

### 3. Target-Disease associations

```graphql
query Associations($ensemblId: String!, $page: Pagination!) {
  target(ensemblId: $ensemblId) {
    approvedSymbol
    associatedDiseases(page: $page) {
      count
      rows {
        disease {
          id
          name
        }
        score
        datasourceScores {
          id
          score
        }
      }
    }
  }
}
```

**Variables:**
```json
{
  "ensemblId": "ENSG00000141510",
  "page": { "index": 0, "size": 10 }
}
```


---

### 4. Disease-Target associations (from disease side)

```graphql
query DiseaseAssociations($efoId: String!, $page: Pagination!) {
  disease(efoId: $efoId) {
    name
    associatedTargets(page: $page) {
      count
      rows {
        target {
          id
          approvedSymbol
        }
        score
        datasourceScores {
          id
          score
        }
      }
    }
  }
}
```

**Variables:**
```json
{
  "efoId": "EFO_0000311",
  "page": { "index": 0, "size": 10 }
}
```

---

### 5. Evidence for a target-disease pair

```graphql
query Evidence($ensemblId: String!, $efoId: String!, $size: Int!) {
  disease(efoId: $efoId) {
    evidences(ensemblIds: [$ensemblId], size: $size) {
      count
      rows {
        id
        score
        datasourceId
        datatypeId
        literature
        diseaseFromSource
        targetFromSourceId
        resourceScore
        urls {
          niceName
          url
        }
      }
    }
  }
}
```

**Variables:**
```json
{
  "ensemblId": "ENSG00000141510",
  "efoId": "EFO_0000311",
  "size": 10
}
```

---

### 6. Drug/molecule information

```graphql
query DrugInfo($chemblId: String!) {
  drug(chemblId: $chemblId) {
    id
    name
    drugType
    maximumClinicalStage
    mechanismsOfAction {
      rows {
        mechanismOfAction
        targets {
          id
          approvedSymbol
        }
      }
    }
    indications {
      rows {
        disease {
          id
          name
        }
        maxClinicalStage
      }
    }

  }
}
```

**Variables:** `{ "chemblId": "CHEMBL25" }` (aspirin)


---

### 7. Search across targets, diseases, and drugs

```graphql
query Search($queryString: String!, $entityNames: [String!], $page: Pagination!) {
  search(queryString: $queryString, entityNames: $entityNames, page: $page) {
    total
    hits {
      id
      entity
      name
      description
      score
    }
  }
}
```

**Variables:**
```json
{
  "queryString": "BRAF melanoma",
  "entityNames": ["target", "disease", "drug"],
  "page": { "index": 0, "size": 10 }
}
```


---

### 8. Drugs and clinical candidates for a target

```graphql
query ClinicalCandidates($ensemblId: String!) {
  target(ensemblId: $ensemblId) {
    approvedSymbol
    drugAndClinicalCandidates {
      count
      rows {
        id
        maxClinicalStage
        drug { id name drugType maximumClinicalStage }
        clinicalReports { id source clinicalStage url }
      }
    }
  }
}
```

Variables: `{ "ensemblId": "ENSG00000157764" }` (BRAF).
The current schema uses clinical-stage strings. Do not parse them as numeric
trial phases or infer withdrawal from a missing field.

---

### 9. Tractability (druggability)

Included in the target query (see endpoint 1 above). Modalities include:
- `SM` (small molecule)
- `AB` (antibody)
- `PR` (PROTAC)
- `OC` (other clinical)

---

## Key Identifiers

| Entity  | ID Format | Example |
|---------|-----------|---------|
| Target  | Ensembl Gene ID | `ENSG00000141510` (TP53) |
| Disease | EFO/Mondo/HP/Orphanet | `EFO_0000311` (cancer), `MONDO_0007254` |
| Drug    | ChEMBL ID | `CHEMBL25` (aspirin) |

## Datasource IDs

Datasource membership changes by release. Read `datasourceScores.id` or the
current Platform data-source documentation before setting evidence filters.
Do not assume the former Genetics Portal IDs remain current after integration
into the Platform. Association scores rank evidence support, not causal probability.

## Pagination

GraphQL uses `page: { index: Int, size: Int }` (0-based index).
Evidence connections instead use `size` plus an opaque `cursor`; request the
returned cursor and continue until exhausted. Other connections expose all rows
without pagination arguments: check the schema for each field.

## Rate Limits

- No API key required.
- Fair-use rate limiting applies. No hard published limit.
- For bulk data, use the Open Targets data downloads (Parquet files on GCS/FTP) rather than API.
- Respect HTTP 429 and `Retry-After` headers.

## Error Format

GraphQL errors:
```json
{
  "errors": [
    {
      "message": "Variable '$ensemblId' expected value of type 'String!' but got: null",
      "locations": [{"line": 1, "column": 7}]
    }
  ]
}
```

Inspect both HTTP status and GraphQL `errors`; an HTTP 200 can contain failed
fields or partial `data`.

## Tips

- Use the GraphQL API for maximum flexibility -- request only the fields you need.
- Send POST with JSON `query` and `variables`; no separate REST search API is documented.
- Combine target + disease queries to get association scores with evidence breakdown.
- Use `datasourceScores` in association queries to see which evidence sources contribute most.
- The Open Targets Platform web UI at `https://platform.opentargets.org` has a GraphQL playground for testing queries.

Current [GraphQL schema](https://api.platform.opentargets.org/api/v4/graphql/schema) and [API guide](https://platform-docs.opentargets.org/data-access/graphql-api).
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexUnverifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexUnverifiedInstall