Alterlab drugbank

From AlterLab-IEU/AlterLab-Academic-Skills · View interactive version

Alterlab drugbank is an AI agent skill from the GitHub repository AlterLab-IEU/AlterLab-Academic-Skills. Analyze drug information of the kind DrugBank curates — drug properties, interactions, targets with actions, metabolizing enzymes, chemical structures, and pharmacology — keylessly from ChEMBL, openFDA labels, PubChem and KEGG, or from a DrugBank XML release when the user holds a licence. Use when w

How to use this skill

Skill file

DrugBank Database

Overview

DrugBank is a comprehensive bioinformatics and cheminformatics database containing detailed information on drugs and drug targets. Its data need an account and licence, and as of 2026-10 even its CC0 open-data files and drug pages answer HTTP 403 here — so this skill answers DrugBank-style questions keylessly from open sources (see "Keyless Path"), and parses DrugBank itself when the user already holds a release. DrugBank covers: thousands of drug entries (FDA-approved small molecules, biotech/biologic drugs, nutraceuticals, and experimental compounds) with 200+ data fields per entry. Exact counts grow with each release — derive them from the version you download rather than quoting a fixed number (the 5.0-era figure was ~9,591 entries).

Access status (checked 2026-09-23). The current downloadable release is 5.1.22

(2026-06-27). DrugBank's releases page states that *all academic dataset downloads are

temporarily paused* while it changes how data are distributed, and every download link

(including the CC0 "Open Data" vocabulary and structures) shows "Temporarily

unavailable" — scripted downloads return HTTP 403. Until access resumes, work from a

copy you already downloaded (pin and cite its version), check

https://go.drugbank.com/releases/latest, or route the question to an open source listed

under "Does NOT Trigger". Academic data are licensed CC BY-NC 4.0; commercial use and

the Clinical API (https://api.drugbank.com/v1/, API-key header) need a paid license.

Keyless Path (default — verified live 2026-10-22)

| Question | Command | Source to name in the answer |

|----------|---------|------------------------------|

| Indication, mechanism, SMILES/InChI/InChIKey/formula, Ro5, max phase | python scripts/drug_open.py info metformin → CHEMBL1431, C4H11N5, XZWYZXLIPXDOLR-UHFFFAOYSA-N; label indication + mechanism | ChEMBL, PubChem, openFDA label (DailyMed set id) |

| Targets with action type; metabolizing CYPs | python scripts/drug_open.py targets imatinib → ABL1 (P00519), PDGFRB, KIT, BCR-ABL — all INHIBITOR; CYP3A4 major, CYP1A2/2C9/2C19/2D6 minor (label quote) | ChEMBL mechanisms (UniProt via ChEMBL targets), openFDA label |

| Pairwise drug–drug interactions | python scripts/drug_open.py interactions warfarin amiodarone simvastatin → per pair: label quotes by section (e.g. "Limit the coadministered dose of simvastatin to 20 mg") + KEGG flag (CI contraindication / P precaution, mechanism such as CYP3A4) | openFDA labels, KEGG DRUG DDI (academic use) |

| Structurally similar approved drugs + Lipinski/Veber | uv run --python ">=3.11" scripts/drug_similarity.py celecoxib (Morgan r2 or --fp maccs; 2,197 approved parents; valdecoxib 0.32 Morgan) · ChEMBL-wide neighbours: drug_open.py similar celecoxib | ChEMBL approved set + RDKit |

Severity is not graded by these sources: grade it from the label wording (contraindicated,

avoid, dose limit, monitor) and the KEGG CI/P flag, and say that is how it was graded. Drug

pathways (SMPDB) and DrugBank's transporter/carrier tables have no keyless equivalent here —

name UniProt/Reactome (alterlab-reactome) for pathways and say what is missing.

When to Use This Skill

Does NOT Trigger

| Scenario | Use Instead |

|----------|-------------|

| FDA drug labels, FAERS adverse events, recalls, approvals (open data) | alterlab-fda |

| Compound bioactivity (IC50/Ki), mechanisms, and indications from open data | alterlab-chembl |

| Genotype-guided dosing / pharmacogene–drug pairs (CPIC, DPWG) | alterlab-clinpgx |

| KEGG DRUG entries, drug–pathway maps, KEGG drug–drug interactions | alterlab-kegg |

| Compound identifiers and properties by name/CID/SMILES | alterlab-pubchem |

| Clinical trial records — recruiting status, eligibility criteria, NCT IDs (ClinicalTrials.gov) | alterlab-clinicaltrials |

Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-fda) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.

Core Capabilities

1. Data Access and Authentication (optional DrugBank path)

The capabilities below describe DrugBank's own data model; with no release in hand, use

the Keyless Path above for each of them. For a licensed DrugBank release, the skill provides guidance on:

When to use: Setting up DrugBank access, downloading database updates, initial project configuration.

Reference: See references/data-access.md for detailed authentication, download procedures, API access, caching strategies, and troubleshooting.

2. Drug Information Queries

Extract comprehensive drug information from the database including identifiers, chemical properties, pharmacology, clinical data, and cross-references to external databases.

Query capabilities:

When to use: Retrieving specific drug information, building drug databases, pharmacology research, literature review, drug profiling.

Reference: See references/drug-queries.md for XML navigation, query functions, data extraction methods, and performance optimization.

3. Drug-Drug Interactions Analysis

Analyze drug-drug interactions (DDIs) including mechanism, clinical significance, and interaction networks for pharmacovigilance and clinical decision support.

Analysis capabilities:

When to use: Polypharmacy safety analysis, clinical decision support, drug interaction prediction, pharmacovigilance research, identifying contraindications.

Reference: See references/interactions.md for interaction extraction, classification methods, network analysis, and clinical applications.

4. Drug Targets and Pathways

Access detailed information about drug-protein interactions including targets, enzymes, transporters, carriers, and biological pathways.

Target analysis capabilities:

When to use: Mechanism of action studies, drug repurposing research, target identification, pathway analysis, predicting off-target effects, understanding drug metabolism.

Reference: See references/targets-pathways.md for target extraction, pathway analysis, repurposing strategies, CYP450 profiling, and transporter analysis.

5. Chemical Properties and Similarity

Perform structure-based analysis including molecular similarity searches, property calculations, substructure searches, and ADMET predictions.

Chemical analysis capabilities:

When to use: Structure-activity relationship (SAR) studies, drug similarity searches, QSAR modeling, drug-likeness assessment, ADMET prediction, chemical space exploration.

Reference: See references/chemical-analysis.md for structure extraction, similarity calculations, fingerprint generation, ADMET predictions, and chemical space analysis.

Typical Workflows

Drug Discovery Workflow

  1. Use data-access.md to download and access latest DrugBank data
  2. Use drug-queries.md to build searchable drug database
  3. Use chemical-analysis.md to find similar compounds
  4. Use targets-pathways.md to identify shared targets
  5. Use interactions.md to check safety of candidate combinations

Polypharmacy Safety Analysis

  1. Use drug-queries.md to look up patient medications
  2. Use interactions.md to check all pairwise interactions
  3. Use interactions.md to classify interaction severity
  4. Use interactions.md to calculate overall risk score
  5. Use targets-pathways.md to understand interaction mechanisms

Drug Repurposing Research

  1. Use targets-pathways.md to find drugs with shared targets
  2. Use chemical-analysis.md to find structurally similar drugs
  3. Use drug-queries.md to extract indication and pharmacology data
  4. Use interactions.md to assess potential combination therapies

Pharmacology Study

  1. Use drug-queries.md to extract drug of interest
  2. Use targets-pathways.md to identify all protein interactions
  3. Use targets-pathways.md to map to biological pathways
  4. Use chemical-analysis.md to predict ADMET properties
  5. Use interactions.md to identify potential contraindications

Installation Requirements

Python Packages

Nothing for drug_open.py (standard library); drug_similarity.py pulls RDKit through

uv run. For a licensed DrugBank release, run your parsing script install-free (add only

the extras it imports):

uv run --python ">=3.11" --with drugbank-downloader --with lxml --with pandas python my_drugbank.py
#   extras: --with bioversions (latest version), --with rdkit (similarity),
#           --with networkx (interaction networks), --with scikit-learn (chemical space)

Account Setup (optional — only for DrugBank's own files)

  1. Create an account at go.drugbank.com
  2. Apply for the Academic License (free for eligible, non-commercial academic research;

data under CC BY-NC 4.0) or obtain a commercial license

  1. Use your account email and password as download credentials (academic downloads

were paused as of 2026-09 — see Access status above)

  1. Configure credentials as documented in references/data-access.md

Data Version and Reproducibility

Always specify the DrugBank version for reproducible research:

from drugbank_downloader import download_drugbank
path = download_drugbank(version='5.1.22')  # Pin an exact version (5.1.22 = 2026-06-27)

Document the version used in publications and analysis scripts.

Best Practices

  1. Credentials: Use environment variables or config files, never hardcode
  2. Versioning: Specify exact database version for reproducibility
  3. Caching: Cache parsed data to avoid re-downloading and re-parsing
  4. Namespaces: Handle XML namespaces properly when parsing
  5. Validation: Validate chemical structures with RDKit before use
  6. Cross-referencing: Use external identifiers (UniProt, PubChem) for integration
  7. Clinical Context: Always consider clinical context when interpreting interaction data
  8. License Compliance: Ensure proper licensing for your use case

Reference Documentation

All detailed implementation guidance is organized in modular reference files:

Load these references as needed based on your specific analysis requirements.

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.