31DrugProt — Drug-Protein Relation Query
SkillProductivityQuery drug/chemical and gene/protein entities in the BioCreative VII DrugProt dataset. Returns annotated relations (e.g., INHIBITOR, ACTIVATOR, SUBSTRATE) between chemicals and genes/proteins from biomedical literature.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the 31DrugProt skill
About this skill
🦀 Agentic RAG for drug intelligence · 57 skills · 15 task categories · DTI · ADR · DDI · PGx · Repurposing · Powered by LangGraph
What this skill tells your AI
The instructions your AI receives, as published by qsong-github/drugclaw in skills/drug_nlp/drugprot/SKILL.md and read by ahel’s review.
Overview
Query drug/chemical and gene/protein entities in the BioCreative VII DrugProt dataset. Returns annotated relations (e.g., INHIBITOR, ACTIVATOR, SUBSTRATE) between chemicals and genes/proteins from biomedical literature.
- Source: https://zenodo.org/records/5119892
- Paper: https://pmc.ncbi.nlm.nih.gov/articles/PMC10683943/
- Coverage: 15,000 PubMed abstracts (3,500 training + 750 development + 10,750 test-background), 13 relation types
Data Location
DrugClaw/
├── skills/drug_nlp/drugprot/
│ └── example.py ← helper script
└── resources_metadata/drug_nlp/DrugProt/
└── drugprot-gs-training-development/
├── training/
│ ├── drugprot_training_abstracs.tsv
│ ├── drugprot_training_entities.tsv
│ └── drugprot_training_relations.tsv
├── development/
│ ├── drugprot_development_abstracs.tsv
│ ├── drugprot_development_entities.tsv
│ └── drugprot_development_relations.tsv
└── test-background/
├── test_background_abstracts.tsv
└── test_background_entities.tsv
Use the repo-local resources_metadata/drug_nlp/DrugProt/drugprot-gs-training-development path, or override it with the DRUGPROT_DIR environment variable if your dataset lives elsewhere.
All three splits are loaded by default. Note: test-background has no relations file (relations are the prediction target).
Quick Start
from importlib.util import spec_from_file_location, module_from_spec
# Load module
spec = spec_from_file_location("drugprot", "/path/to/skills/drug_nlp/drugprot/example.py")
dp = module_from_spec(spec)
spec.loader.exec_module(dp)
# Load dataset (one-time, ~2 s)
ds = dp.load_dataset("/path/to/drugprot-gs-training-development")
# Query single entity
results = dp.query_entities(ds, "aspirin")
print(dp.format_results(results))
# Query multiple entities
results = dp.query_entities(ds, ["metformin", "insulin", "EGFR"])
print(dp.format_results(results))
API
load_dataset(base_dir, splits=["training","development","test-background"]) -> dict
Loads and indexes all TSV files. Returns a dict with keys: abstracts, entities, relations, name_index.
query_entities(dataset, names, case_sensitive=False) -> list[dict]
| Parameter | Type | Description |
|---|---|---|
dataset | dict | Output of load_dataset() |
names | str or list[str] | Entity name(s) to query |
case_sensitive | bool | Default False; falls back to substring match if exact match fails |
Returns a list of result dicts, one per query name:
[
{
"query": "aspirin",
"matches": [
{
"pmid": "12345678",
"entity_id": "T3",
"entity_type": "CHEMICAL",
"entity_text": "aspirin",
"relations": [
{
"relation_type": "INHIBITOR",
"partner_id": "T12",
"partner_text": "COX-2",
"partner_type": "GENE-Y",
"role": "arg1(chemical)"
}
],
"article_title": "Effects of aspirin on ..."
}
]
}
]
format_results(results, max_matches=5) -> str
Formats query results into a concise, LLM-readable plain-text summary.
Relation Types
| Type | Description |
|---|---|
| INHIBITOR | Chemical inhibits gene/protein |
| ACTIVATOR | Chemical activates gene/protein |
| AGONIST | Chemical is an agonist |
| ANTAGONIST | Chemical is an antagonist |
| SUBSTRATE | Chemical is a substrate |
| PRODUCT-OF | Chemical is a product of enzyme |
| INDIRECT-DOWNREGULATOR | Chemical indirectly downregulates |
| INDIRECT-UPREGULATOR | Chemical indirectly upregulates |
| DIRECT-REGULATOR | Chemical directly regulates |
| PART-OF | Chemical is part of protein complex |
| COFACTOR | Chemical acts as cofactor |
| NOT | Negative relation |
| UNDEFINED | Undefined relation |
CLI Usage
export DRUGPROT_DIR=/path/to/drugprot-gs-training-development
python 31_DrugProt.py aspirin insulin p53
Signals
- GitHub stars
- 116
- Forks
- 3
- Last commit
- Aug 2026
Advanced
- Item type
- skill
- Key
drugprot- Source
- github.com/qsong-github/drugclaw
github.com/qsong-github/drugclaw
Related picks
Skill · wshobson
The pick for Pythonpython-pro
Skill · jeffallan
The pick for Pythonacademic-paper-composer
Skill · brycewang-stanford
The pick for Academic03-academic-writing
Skill · 24kchengye
The pick for Academicsocial
Skill · coreyhaines31
More in Productivitygws-calendar
Skill · googleworkspace
More in Productivity