$npx -y skills add QSong-github/DrugClaw --skill molecular_targetsQuery the NCI CCDI Molecular Targets Platform (pediatric oncology) for targets (genes), diseases, drugs, and target-disease associations via its public GraphQL API. Auto-detects entity type from input string.
| 1 | # Molecular Targets Platform Query Skill |
| 2 | |
| 3 | Search the CCDI Molecular Targets Platform — an NCI-supported Open Targets |
| 4 | instance focused on **preclinical pediatric oncology** data. Includes FDA |
| 5 | Pediatric Molecular Target Lists and additional pediatric cancer datasets. |
| 6 | |
| 7 | ## Entity Auto-Detection |
| 8 | |
| 9 | | Input Pattern | Detected As | Query Used | |
| 10 | |---|---|---| |
| 11 | | `ENSG00000141510` | Target (Ensembl gene) | `target(ensemblId)` | |
| 12 | | `EFO_\d+`, `MONDO_\d+`, `Orphanet_\d+`, `HP_\d+`, `DOID_\d+` | Disease / Phenotype | `disease(efoId)` | |
| 13 | | `CHEMBL\d+` | Drug / molecule | `drug(chemblId)` | |
| 14 | | anything else | Free text | `search(queryString)` | |
| 15 | |
| 16 | ## API |
| 17 | |
| 18 | | Function | Input | Returns | |
| 19 | |---|---|---| |
| 20 | | `search(entity, size=10)` | single entity string | `dict` (GraphQL data) or `None` | |
| 21 | | `search_batch(entities)` | list of strings | `dict[str, dict\|None]` — uses batch GraphQL where possible | |
| 22 | | `get_associations(entity, size=10)` | Ensembl ID or EFO/MONDO ID | associated diseases (for target) or targets (for disease) | |
| 23 | | `summarize(data, entity)` | result dict + label | compact LLM-readable text | |
| 24 | | `to_json(data)` | result dict | `list[dict]` for pipeline output | |
| 25 | |
| 26 | ### Helper |
| 27 | |
| 28 | | Function | Purpose | |
| 29 | |---|---| |
| 30 | | `detect_entity_type(entity)` | returns `'target'`, `'disease'`, `'drug'`, or `'search'` | |
| 31 | |
| 32 | ## Usage |
| 33 | |
| 34 | See `if __name__ == "__main__"` block in `16_MolecularTargets.py` for runnable |
| 35 | examples covering: |
| 36 | |
| 37 | 1. Free-text search (`"neuroblastoma"`) |
| 38 | 2. Target lookup by Ensembl ID (`"ENSG00000141510"` → TP53) |
| 39 | 3. Disease lookup by ontology ID (`"MONDO_0005072"`) |
| 40 | 4. Drug lookup by ChEMBL ID (`"CHEMBL941"` → imatinib) |
| 41 | 5. Target → disease associations |
| 42 | 6. Disease → target associations |
| 43 | 7. Batch search (mixed entity types) |
| 44 | 8. JSON pipeline output |
| 45 | |
| 46 | ## Data Source |
| 47 | |
| 48 | - **Platform**: NCI CCDI Molecular Targets Platform |
| 49 | - **URL**: <https://moleculartargets.ccdi.cancer.gov> |
| 50 | - **API endpoint**: `https://moleculartargets.ccdi.cancer.gov/api/v4/graphql` |
| 51 | - **Method**: HTTP POST, `Content-Type: application/json`, no auth required |
| 52 | - **Upstream schema**: Open Targets Platform GraphQL v4 |
| 53 | - **Focus**: Pediatric oncology — FDA Pediatric Molecular Target Lists, preclinical data |
| 54 | |
| 55 | ## Notes |
| 56 | |
| 57 | - The API is optimised for single-entity queries. For bulk analyses consider |
| 58 | Open Targets data downloads. |
| 59 | - Batch functions (`search_batch`) use the plural GraphQL fields |
| 60 | (`targets`, `diseases`, `drugs`) to reduce round-trips where possible; |
| 61 | free-text queries fall back to one-at-a-time. |
| 62 | - `get_associations()` returns scored target↔disease links ranked by overall |
| 63 | evidence score (0–1). Use `size` to control how many rows are returned. |
| 64 | - Returns `None` / `[]` on HTTP errors — callers handle no-results gracefully. |