tooluniverse-network-pharmacology
Compound-target-disease network construction and analysis for drug repurposing, polypharmacology discovery, and multi-target drug design. Uses STRING, BioGRID, ChEMBL, DGIdb, OMIM, OpenTargets. Use for off-target effect prediction, network-based drug repurposing, and identifying molecules with desir
By mims-harvard · 411 installs
npx skills add mims-harvard/tooluniverse --skill tooluniverse-network-pharmacology
Source repository · Upstream listing
COMPUTE, DON'T DESCRIBE
When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
Network Pharmacology Pipeline
Construct and analyze compound target disease (C T D) networks to identify drug repurposing opportunities, understand polypharmacology, and predict drug mechanisms using systems pharmacology approaches.
LOOK UP DON'T GUESS Retrieve actual target lists, network data, and clinical evidence from tools. Do not infer network relationships from drug class alone.
IMPORTANT : Always use English terms in tool calls, even if the user writes in another language. Respond in the user's language.
Polypharmacology Reasoning (Start Here)
Before building any network, reason about what kind of multi target effect you are dealing with:
A drug hitting multiple targets is either polypharmacology (desired multi target) or promiscuity (undesired off target). The distinction depends on whether the additional targets contribute to efficacy or cause toxicity.
Use this framework to guide the analysis:
Desired polypharmacology : multiple targets all lie within the same disease module or pathway. Example: a kinase inhibitor that hits both EGFR and ERBB2 in the same signaling cascade. Look for pathway co membership and disease module overlap. This is a network proximity argument.
Off target promiscuity : additional targets are in unrelated pathways, especially those associated with known toxicity (hERG for cardiotoxicity, CYP3A4 for drug interactions, COX 1 for GI toxicity). Look for these in the safety phase before claiming benefit.
Repurposing hypothesis : the drug's known targets have strong genetic/functional evidence for the new disease. Network proximity (Z score) quantifies this. A Z < 2 with p < 0.01 is meaningful signal; a Z near 0 means the targets are essentially unconnected to the disease module.
Mechanism ambiguity : if a drug has 10+ known targets, do not treat all as therapeutically relevant. Start with primary mechanism of action targets, then ask whether secondary targets add to or subtract from the therapeutic window.
Document this reasoning explicitly in the report before listing candidates.
When to Use This Skill
Apply when users:
Ask "Can [drug] be repurposed for [disease] based on network analysis?"
Want to understand multi target (polypharmacology) effects of a compound
Need compound target disease network construction and analysis
Ask about network proximity between drug targets and disease genes
Want systems pharmacology analysis of a drug or target
Ask about drug repurposing candidates ranked by network metrics
Need mechanism prediction for a drug in a new indication
Want to identify hub genes in disease networks as therapeutic targets
NOT for (use other skills instead):
Simple drug repurposing without network analysis tooluniverse drug repurposing
Single target validation tooluniverse drug target validation
Adverse event detection only tooluniverse adverse event detection
Key Principles
1. Report first approach Create report file FIRST, then populate progressively
2. Entity disambiguation FIRST Resolve all identifiers before analysis
3. Reason about polypharmacology type Desired vs. promiscuous (see above)
4. Bidirectional network Construct C T D network from both directions
5. Rank candidates Prioritize by composite Network Pharmacology Score
6. Mechanism prediction Explain HOW drug could work via network paths
7. Clinical feasibility FDA approved drugs ranked higher than preclinical
8. Safety context Flag known adverse events and off target liabilities
9. Evidence grading Grade all evidence T1 T4
10. Negative results documented "No data" is data; empty sections are failures
11. Source references Every finding must cite the source tool/database
Network Pharmacology Score (0 100)
Five components with explicit reasoning at each step:
Network Proximity (35 pts) : Z < 2, p < 0.01 earns full points. A drug whose targets are in a different network neighborhood from the disease module scores near zero here. Do not claim proximity without computing the Z score.
Clinical Evidence (25 pts) : Approved for related indication earns full points. Clinical trial evidence earns partial credit. Computational prediction alone earns none.
Target Disease Association (20 pts) : Strong genetic evidence (GWAS, rare variants) for the drug's primary targets in the new disease.
Safety Profile (10 pts) : FDA approved, favorable safety in target population.
Mechanism Plausibility (10 pts) : A clear pathway mechanism with functional evidence, not just co mention in literature.
Priority tiers: 80 100 = high repurposing potential (proceed to experimental validation); 60 79 = good potential (needs mechanistic validation); 40 59 = moderate potential (high risk/high reward); 0 39 = low potential.
Evidence grades: T1 = human clinical proof; T2 = functional experimental evidence (IC50 < 1 uM, CRISPR screen); T3 = association/computational (GWAS hit, network proximity); T4 = prediction or text mining only.
Full scoring details: [SCORING REFERENCE.md](SCORING REFERENCE.md)
Workflow Overview
Phase 0: Entity Disambiguation and Report Setup
Create report file immediately
Resolve entity to all required IDs (ChEMBL, DrugBank, PubChem CID, Ensembl, MONDO/EFO)
Tools: OpenTargets get drug chembId by generic name , drugbank get drug basic info by drug name or id , PubChem get CID by compound name , OpenTargets get target id description by name , OpenTargets get disease id description by name
Phase 1: Network Node Identification
Compound nodes : Drug targets, mechanism of action, current indications
Target nodes : Disease associated genes, GWAS targets, druggability levels
Disease nodes : Related diseases, hierarchy, phenotypes
Tools: OpenTargets get drug mechanisms of action by chemblId , OpenTargets get associated targets by drug chemblId , drugbank get targets by drug name or drugbank id , DGIdb get drug gene interactions , CTD get chemical gene interactions , OpenTargets get associated targets by disease efoId , Pharos get target
Phase 2: Network Edge Construction
C T edges : Bioactivity data (ChEMBL, DrugBank, BindingDB)
T D edges : Genetic/functional associations (OpenTargets evidence, GWAS, CTD)
C D edges : Clinical trials, CTD chemical disease, literature co mentions
T T edges : PPI network (STRING, IntAct, OpenTargets interactions, HumanBase)
Tools: ChEMBL get target activities , OpenTargets target disease evidence , GWAS search associations by gene , search clinical trials , CTD get chemical diseases , STRING get interaction partners , STRING get network , intact search interactions , humanbase ppi analysis
Phase 3: Network Analysis
Hub identification: which targets are most connected in the drug disease subnetwork
Shortest paths between drug targets and disease genes: how many hops, through which intermediaries
Network proximity Z score: are drug targets closer to disease module than random expectation
Use the Network proximity tool — Guney/Barabasi (2016) + Menche (2015) set distance with a degree matched Z score, computed deterministically from a graph you supply (inline edges or an edgelist path ) plus two node sets ( set a / set b , or the aliases targets / disease genes ). measure = closest (default), shortest , or separation (s AB < 0 ⇒ overlapping modules). Returns value , z score , p value .
Feed it the edges from Phase 2. Tested end to end: STRING get network returns rows with preferredName A / preferredName B (gene symbols) — map each to a [A, B] pair and pass as edges ; the IDs line up with symbol based gene sets natively (no conversion).
Use a LARGE interactome for the null. A small query centered subnetwork (e.g. STRING get network with a low limit ) makes the degree matched random sets nearly identical to the real ones, giving an uninformative z 0, p≈1 . For a meaningful Z, pull the broad interactome (high limit , or a full network via NDEx get network ), not just the immediate neighborhood. (The skill's scripts/network proximity.py , which downloads the full STRING network, is the CLI equivalent.)
Functional enrichment to identify shared biological processes
Tools: Network proximity , STRING functional enrichment , STRING ppi enrichment , enrichr gene enrichment analysis , ReactomeAnalysis pathway enrichment
Phase 4: Drug Repurposing Predictions
Identify drugs targeting disease genes (disease to compound mode)
Find diseases associated with drug targets (compound to disease mode)
Rank candidates by composite Network Pharmacology Score
Predict mechanisms via shared pathways and network paths
Tools: OpenTargets get associated drugs by target ensemblID , drugbank get drug name and description by target name , drugbank get pathways reactions by drug or id
Phase 5: Polypharmacology Analysis
Classify each secondary target as contributing to efficacy or representing off target risk
Disease module coverage: what fraction of disease genes are hit directly or within 1 hop
Target family analysis and selectivity
Tools: OpenTargets get target classes by ensemblID , DGIdb get gene druggability , OpenTargets get target tractability by ensemblID
Phase 6: Safety and Toxicity Context
Adverse event profiling (FAERS disproportionality, OpenTargets AEs)
Target safety (gene constraints, expression, safety profiles)
FDA warnings, black box status
Tools: FAERS calculate disproportionality , FAERS filter serious events , FAERS count death related by drug , FDA get warnings and cautions by drug name , OpenTargets get drug adverse events by chemblId , OpenTargets get target safety profile by ensemblID , gnomad get gene constraints
Phase 7: Validation Evidence
Clinical trials for drug disease pair
Literature evidence (PubMed, EuropePMC)
ADMET predictions if SMILES available
Pharmacogenomics data
Tools: search clinical trials , get clinical trial descriptions , PubMed search articles , EuropePMC search articles , ADMETAI predict toxicity , PharmGKB get drug details
Phase 8: Report Generation
Compute Network Pharmacology Score from components
Document polypharmacology reasoning (desired vs. promiscuous)
Generate report using template
Include completeness checklist
Full step by step code examples: [ANALYSIS PROCEDURES.md](ANALYSIS PROCEDURES.md)
Report template: [REPORT TEMPLATE.md](REPORT TEMPLATE.md)
Critical Tool Parameter Notes
DrugBank tools : ALL require query , case sensitive , exact match , limit (4 params, ALL required)
FAERS analytics tools : ALL require operation parameter
FAERS count tools : Use medicinalproduct NOT drug name
OpenTargets tools : Return nested {data: {entity: {field: ...}}} structure
PubMed search articles : Returns plain list of dicts, NOT {articles: [...]}
ReactomeAnalysis pathway enrichment : Takes space separated identifiers string, NOT array
ensembl lookup gene : REQUIRES species='homo sapiens' parameter
Full tool parameter reference and response structures: [TOOL REFERENCE.md](TOOL REFERENCE.md)
Fallback Strategies
When a tool fails, try the next in chain before reporting "no data":
Compound ID: OpenTargets drug lookup ChEMBL search PubChem CID lookup
Target ID: OpenTargets target lookup ensembl lookup gene MyGene query genes
Disease ID: OpenTargets disease lookup ols search efo terms CTD get chemical diseases
Drug targets: OpenTargets drug mechanisms DrugBank targets DGIdb interac