name: tooluniverse-network-pharmacology
description: Construct and analyze compound-target-disease networks for drug repurposing, polypharmacology discovery, and systems pharmacology. Builds multi-layer networks from ChEMBL, OpenTargets, STRING, DrugBank, Reactome, FAERS, and 60+ other ToolUniverse tools. Calculates Network Pharmacology Scores (0-100), identifies repurposing candidates, predicts mechanisms, and analyzes polypharmacology. Use when users ask about drug repurposing via network analysis, multi-target drug effects, compound-target-disease networks, systems pharmacology, or polypharmacology.
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.
IMPORTANT: Always use English terms in tool calls (drug names, disease names, target names), even if the user writes in another language. Only try original-language terms as a fallback if English returns no results. Respond in the user's language.
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
Ask about disease module coverage by a compound's targets
NOT for (use other skills instead):
Simple drug repurposing without network analysis -> Use tooluniverse-drug-repurposing
Single target validation -> Use tooluniverse-drug-target-validation
Adverse event detection only -> Use tooluniverse-adverse-event-detection
General disease research -> Use tooluniverse-disease-research
GWAS interpretation -> Use tooluniverse-gwas-snp-interpretation
Input Parameters
Parameter
Required
Description
Example
entity
Yes
Compound name/ID, target gene symbol/ID, or disease name/ID
metformin, EGFR, Alzheimer disease
entity_type
No
Type hint: compound, target, or disease (auto-detected if omitted)
# Get ChEMBL bioactivity data for drug targets
chembl_activities = tu.tools.ChEMBL_get_target_activities(
target_chembl_id__exact="CHEMBL2111455", # example target ChEMBL ID
limit=50
)
# Returns activity data with pchembl_value, standard_type (IC50, Ki, etc.)
# Search ChEMBL mechanisms (all mechanisms for drug)
all_mechanisms = tu.tools.ChEMBL_search_mechanisms(
query="metformin", limit=50
)
# Get DrugBank drug targets with action types
db_targets = tu.tools.drugbank_get_targets_by_drug_name_or_drugbank_id(
query="metformin", case_sensitive=False, exact_match=True, limit=1
)
# Returns: targets with action type (inhibitor, substrate, etc.)
# Get pharmacology from DrugBank
db_pharmacology = tu.tools.drugbank_get_pharmacology_by_drug_name_or_drugbank_id(
query="metformin", case_sensitive=False, exact_match=True, limit=1
)
# Get BindingDB ligands for key targets (if UniProt ID available)
# binding_data = tu.tools.BindingDB_get_ligands_by_uniprot(uniprot_accession="P49768")
Step 2.2: Target-disease edges (genetic and functional associations).
# Get OpenTargets target-disease evidence
for target in top_disease_targets[:10]:
td_evidence = tu.tools.OpenTargets_target_disease_evidence(
efoId=disease_id,
ensemblId=target['target']['id']
)
# Returns: evidence across datasources (genetics, pathways, literature, etc.)
# Get GWAS associations for key genes
for gene_symbol in ["PSEN1", "APP", "APOE"]:
gwas_assoc = tu.tools.GWAS_search_associations_by_gene(gene_name=gene_symbol)
# Get gene-disease links from CTD
ctd_gene_diseases = tu.tools.CTD_get_gene_diseases(
input_terms="PSEN1"
)
# Get PharmGKB gene details (pharmacogenomics)
pharmgkb_gene = tu.tools.PharmGKB_get_gene_details(gene_symbol="PSEN1")
Step 3.1: Network topology analysis (computed from collected data).
Compute from Phase 2 data:
1. Node Degree:
- Count connections per node from STRING + IntAct + OpenTargets interactions
- Drug targets: connections from bioactivity data
- Disease genes: connections from PPI data
2. Hub Identification:
- Nodes with degree > mean + 2*SD are hubs
- Hub genes in disease module = priority therapeutic targets
3. Betweenness Centrality:
- Nodes on shortest paths between drug targets and disease genes
- High betweenness = potential mediating/bridging targets
4. Network Modules:
- Disease module: cluster of disease-associated genes in PPI
- Drug module: cluster of drug target genes in PPI
- Module overlap = direct network relevance
5. Shortest Paths:
- Paths from each drug target to each disease gene via PPI
- Shortest path length < 2 = direct interaction
- Path length 2-3 = close proximity
- Path length > 4 = distant, weaker association
Step 3.2: Network proximity calculation.
Network Proximity Z-score (computed from data):
1. Collect drug target set T_d from Phase 1
2. Collect disease gene set G_d from Phase 1
3. For each drug target t in T_d and disease gene g in G_d:
- Find shortest path d(t,g) in PPI network from Phase 2
4. Compute closest proximity: d_c = mean of min distances
5. Compare against random expectation:
- Sample N random gene sets of same size as T_d
- Compute proximity for each random set
- Z = (d_c - mean_random) / sd_random
6. Z < -2: strong proximity (35 points)
Z < -1: moderate proximity (20 points)
Z < -0.5: weak proximity (10 points)
Z >= -0.5: no proximity (0 points)
Practical computation from STRING/OpenTargets PPI data:
- Count direct interactions between drug targets and disease genes
- Count shared PPI partners (second-degree connections)
- Calculate overlap coefficient = shared_partners / min(degree_t, degree_d)
- Use number of shared pathways as additional proximity metric
Step 3.3: Functional enrichment analysis.
# STRING functional enrichment for disease genes
disease_gene_symbols = [t['target']['approvedSymbol']
for t in disease_targets['data']['disease']['associatedTargets']['rows'][:20]]
string_enrichment = tu.tools.STRING_functional_enrichment(
protein_ids=disease_gene_symbols,
species=9606
)
# STRING PPI enrichment (statistical test for network connectivity)
string_ppi_enrich = tu.tools.STRING_ppi_enrichment(
protein_ids=disease_gene_symbols,
species=9606
)
# Enrichr pathway analysis
enrichr_results = tu.tools.enrichr_gene_enrichment_analysis(
gene_list=disease_gene_symbols,
libs=["KEGG_2021_Human", "Reactome_2022", "GO_Biological_Process_2023"]
)
# Returns enrichment results per library
# Reactome pathway enrichment
reactome_enrichment = tu.tools.ReactomeAnalysis_pathway_enrichment(
identifiers=" ".join(disease_gene_symbols)
)
# Returns: {data: {pathways: [{pathway_id, name, p_value, fdr, entities_found, ...}]}}
Phase 4: Drug Repurposing Predictions
Step 4.1: Identify and rank repurposing candidates.
# For disease-to-compound mode: Find drugs targeting disease genes
repurposing_candidates = []
for target in disease_targets['data']['disease']['associatedTargets']['rows'][:20]:
gene_symbol = target['target']['approvedSymbol']
ensembl_id = target['target']['id']
target_score = target['score']
# Get drugs from OpenTargets
target_drugs = tu.tools.OpenTargets_get_associated_drugs_by_target_ensemblID(
ensemblId=ensembl_id, size=20
)
# Get drugs from DGIdb
dgidb_drugs = tu.tools.DGIdb_get_drug_gene_interactions(genes=[gene_symbol])
# Get drugs from DrugBank
drugbank_drugs = tu.tools.drugbank_get_drug_name_and_description_by_target_name(
query=gene_symbol, case_sensitive=False, exact_match=False, limit=20
)
# Collect and deduplicate candidates
# Score each by: target_disease_score * drug_target_affinity * approval_status
# For compound-to-disease mode: Already have drug targets, find their diseases
for target in drug_targets:
# Get diseases associated with each drug target
target_diseases = tu.tools.OpenTargets_get_diseases_phenotypes_by_target_ensembl(
ensemblId=target['id'], size=20
)
Step 4.2: Mechanism prediction for repurposing candidates.
# For each repurposing candidate, trace the network path:
# Drug -> Direct targets -> PPI neighbors -> Disease genes
# Get drug mechanism
drug_moa = tu.tools.OpenTargets_get_drug_mechanisms_of_action_by_chemblId(
chemblId=candidate_chembl_id
)
# Get pathways shared between drug targets and disease genes
drug_target_genes = [t['approvedSymbol'] for t in drug_moa_targets]
combined_genes = list(set(drug_target_genes + disease_gene_symbols[:10]))
# Pathway enrichment for combined gene set
combined_pathways = tu.tools.ReactomeAnalysis_pathway_enrichment(
identifiers=" ".join(combined_genes)
)
# Check for specific pathway overlap
drug_pathways = tu.tools.drugbank_get_pathways_reactions_by_drug_or_id(
query=drug_name, case_sensitive=False, exact_match=True, limit=1
)
Phase 5: Polypharmacology Analysis
Step 5.1: Multi-target profiling.
# Get ALL targets of compound (on-targets + off-targets)
# From OpenTargets
all_drug_targets = tu.tools.OpenTargets_get_associated_targets_by_drug_chemblId(
chemblId=chembl_id, size=100
)
# From DrugBank (includes enzymes, carriers, transporters)
db_full_targets = tu.tools.drugbank_get_targets_by_drug_name_or_drugbank_id(
query=drug_name, case_sensitive=False, exact_match=True, limit=1
)
# From CTD (chemical-gene interactions, includes indirect)
ctd_interactions = tu.tools.CTD_get_chemical_gene_interactions(
input_terms=drug_name
)
# Classify targets: primary (mechanism) vs secondary (off-target)
# Count disease module coverage
drug_target_set = set(drug_target_genes)
disease_gene_set = set(disease_gene_symbols[:50])
overlap = drug_target_set & disease_gene_set
coverage = len(overlap) / len(disease_gene_set) if disease_gene_set else 0
# Target family analysis
for gene in drug_target_genes[:10]:
target_class = tu.tools.OpenTargets_get_target_classes_by_ensemblID(
ensemblId=gene_ensembl_id
)
Step 5.2: Selectivity analysis.
# Get target druggability and development levels
for gene in drug_target_genes[:10]:
# DGIdb druggability
druggability = tu.tools.DGIdb_get_gene_druggability(genes=[gene])
# Pharos target development level
pharos_info = tu.tools.Pharos_get_target(target_name=gene)
# Tclin = known drug targets, Tchem = has chemical tools, Tbio = has biology, Tdark = dark target
# OpenTargets tractability
tractability = tu.tools.OpenTargets_get_target_tractability_by_ensemblID(
ensemblId=gene_ensembl_id
)
Phase 6: Safety and Toxicity Context
Step 6.1: Adverse event profiling.
# Get FAERS adverse event data
faers_ae = tu.tools.FAERS_search_reports_by_drug_and_reaction(
drug_name=drug_name, limit=100
)
# Get serious events
faers_serious = tu.tools.FAERS_filter_serious_events(
operation="filter_serious_events",
drug_name=drug_name,
seriousness_type="all"
)
# Get death reports
faers_death = tu.tools.FAERS_count_death_related_by_drug(
medicinalproduct=drug_name
)
# Returns: [{term: "alive", count: N}, {term: "death", count: N}]
# Calculate disproportionality for key AEs
faers_signal = tu.tools.FAERS_calculate_disproportionality(
operation="calculate_disproportionality",
drug_name=drug_name,
adverse_event="lactic acidosis" # example
)
# Returns: {metrics: {PRR: {value, ci_95_lower, ci_95_upper}, ROR: {...}}, signal_detection: {signal_detected, signal_strength}}
# Get FDA warnings
fda_warnings = tu.tools.FDA_get_warnings_and_cautions_by_drug_name(
drug_name=drug_name
)
# Get black box warning status
bbox_warning = tu.tools.OpenTargets_get_drug_blackbox_status_by_chembl_ID(
chemblId=chembl_id
)
# Get drug adverse events from OpenTargets
ot_ae = tu.tools.OpenTargets_get_drug_adverse_events_by_chemblId(
chemblId=chembl_id
)
# Returns: {data: {drug: {adverseEvents: {count, rows: [{name, meddraCode, count, logLR}]}}}}
# Get drug warnings from OpenTargets
drug_warnings = tu.tools.OpenTargets_get_drug_warnings_by_chemblId(
chemblId=chembl_id
)
Step 6.2: Target safety profiling.
# For each drug target, assess safety
for target_ensembl_id in drug_target_ensembl_ids[:10]:
# OpenTargets target safety profile
safety = tu.tools.OpenTargets_get_target_safety_profile_by_ensemblID(
ensemblId=target_ensembl_id
)
# Gene constraint (is target essential?)
constraints = tu.tools.gnomad_get_gene_constraints(gene_symbol=gene_symbol)
# High pLI (>0.9) = loss-of-function intolerant = essential gene = safety concern
# Expression pattern (broadly expressed = more off-target risk)
expression = tu.tools.HPA_get_rna_expression_by_source(
gene_name=gene_symbol,
source_type="tissue",
source_name="brain"
)
Phase 7: Validation Evidence
Step 7.1: Clinical precedent.
# Search clinical trials for drug + disease combination
trials = tu.tools.search_clinical_trials(
query_term=drug_name,
condition=disease_name,
pageSize=20
)
# Get trial details for each match
for trial in trials.get('studies', [])[:5]:
nct_id = trial['NCT ID']
trial_details = tu.tools.clinical_trials_get_details(nct_id=nct_id)
trial_outcomes = tu.tools.extract_clinical_trial_outcomes(nct_id=nct_id)
trial_ae = tu.tools.extract_clinical_trial_adverse_events(nct_id=nct_id)
# Check approved indications
approved = tu.tools.OpenTargets_get_approved_indications_by_drug_chemblId(
chemblId=chembl_id
)
# Returns: {data: {drug: {approvedIndications: ["EFO_XXXXX", ...]}}}
Step 7.2: Literature evidence.
# PubMed search for drug-disease co-mentions
pubmed_evidence = tu.tools.PubMed_search_articles(
query=f"{drug_name} {disease_name} repurposing OR repositioning OR network pharmacology",
max_results=50
)
# Returns: list of {pmid, title, authors, journal, pub_date, ...}
# Europe PMC with broader scope
europepmc_evidence = tu.tools.EuropePMC_search_articles(
query=f"{drug_name} {disease_name}",
limit=50
)
# OpenTargets publications for drug
ot_drug_pubs = tu.tools.OpenTargets_get_publications_by_drug_chemblId(
chemblId=chembl_id, size=20
)
# OpenTargets publications for disease
ot_disease_pubs = tu.tools.OpenTargets_get_publications_by_disease_efoId(
efoId=disease_id, size=20
)
# Get guideline searches
guidelines = tu.tools.PubMed_Guidelines_Search(query=f"{drug_name} {disease_name}")
Score Calculation:
1. Network Proximity Score (0-35):
- Count direct drug target <-> disease gene interactions in PPI
- Count shared PPI partners
- Count shared pathways
- Map to Z-score equivalent based on overlap significance
2. Clinical Evidence Score (0-25):
- Search clinical trials for drug-disease pair
- Check approved indications for related diseases
- Check max clinical trial phase
3. Target-Disease Association Score (0-20):
- Average OpenTargets association score for drug targets in disease
- Weight by evidence type (genetic > functional > computational)
4. Safety Score (0-10):
- FDA approval status (+5)
- Black box warning (-3)
- Death reports proportion
- Off-target count penalty
5. Mechanism Plausibility Score (0-10):
- Known mechanism for related indication (+5)
- Pathway evidence (+3)
- Network path length to disease module (+2)
Total: sum of components (0-100)
Step 8.2: Generate comprehensive report.
# Network Pharmacology Analysis: [Entity]
## Executive Summary
[2-3 sentence summary of key findings]
## Network Pharmacology Score: [X]/100 - [Tier]
| Component | Score | Max | Evidence |
|-----------|-------|-----|----------|
| Network Proximity | X | 35 | [summary] |
| Clinical Evidence | X | 25 | [summary] |
| Target-Disease Association | X | 20 | [summary] |
| Safety Profile | X | 10 | [summary] |
| Mechanism Plausibility | X | 10 | [summary] |
| **TOTAL** | **X** | **100** | |
## 1. Entity Profile
### Compound: [Name]
- ChEMBL ID: [ID]
- DrugBank ID: [ID]
- SMILES: [SMILES]
- Mechanism: [MOA]
- Approval status: [status]
- Current indications: [list]
### Disease: [Name]
- MONDO/EFO ID: [ID]
- Description: [brief]
- Top associated targets: [list with scores]
- Related diseases: [list]
## 2. Network Topology Summary
- **Total nodes**: X (Y compounds, Z targets, W diseases)
- **Total edges**: X (Y C-T, Z T-D, W C-D, V T-T)
- **Network density**: X
- **Hub nodes**: [list of top hub genes]
- **Modules detected**: X
### Drug Target Module
[List drug targets with degree and betweenness]
### Disease Gene Module
[List disease genes with degree and betweenness]
### Module Overlap
[Shared genes, shared pathways, overlap coefficient]
## 3. Network Proximity
- **Proximity measure**: [metric used]
- **Z-score**: [value]
- **Direct interactions**: X drug target-disease gene pairs
- **Shared PPI partners**: X genes
- **Shared pathways**: X pathways
- **Interpretation**: [strong/moderate/weak proximity]
## 4. Top Repurposing Candidates (Ranked)
### Candidate 1: [Drug Name] - Score: X/100
**ChEMBL ID**: [ID] | **Status**: [Approved/Clinical/Preclinical]
**Current indications**: [list]
**Network path**: Drug -> [target1, target2] -> [PPI] -> [disease gene1, gene2]
**Mechanism prediction**: [how drug could work for disease]
**Clinical evidence**: [trials, literature]
**Safety**: [key concerns]
**Evidence grade**: [T1-T4]
[Repeat for top 10 candidates]
## 5. Polypharmacology Profile
### Target Coverage
- Total drug targets: X
- Disease module targets hit: Y (Z%)
- Primary targets: [list with actions]
- Off-targets: [list with potential effects]
### Multi-Target Effects
[Analysis of synergistic vs antagonistic target modulation]
### Disease Module Coverage
[How well drug targets cover the disease network]
## 6. Pathway Analysis
### Drug-Affected Pathways
[Ranked list of pathways affected by drug]
### Disease-Associated Pathways
[Ranked list of pathways associated with disease]
### Overlapping Pathways (Mechanism)
[Pathways shared between drug and disease - these explain the mechanism]
## 7. Safety Considerations
### Adverse Events
[Top AEs with PRR/ROR where available]
### Target Safety Flags
[Targets with known safety liabilities]
### Off-Target Risks
[Off-targets in critical tissues]
### Drug-Drug Interaction Context
[Key DDI considerations]
## 8. Clinical Precedent
### Clinical Trials
[List of relevant trials with NCT IDs and status]
### Literature Evidence
[Key publications supporting or refuting repurposing hypothesis]
- N papers found for [drug] + [disease]
- Key findings: [summary]
### Pharmacogenomics
[Relevant PGx data]
## 9. Evidence Summary Table
| Finding | Source | Evidence Grade | Confidence |
|---------|--------|---------------|------------|
| [finding1] | [tool/database] | [T1-T4] | [High/Medium/Low] |
| ... | ... | ... | ... |
## 10. Recommendations
### Immediate Actions
1. [Action 1 - e.g., review clinical trial NCT00620191]
2. [Action 2 - e.g., validate mechanism in cell model]
### Further Investigation
1. [Investigation 1]
2. [Investigation 2]
### Risk Mitigation
1. [Risk 1 and mitigation strategy]
## Completeness Checklist
| Phase | Status | Tools Used | Key Findings |
|-------|--------|------------|--------------|
| Entity Disambiguation | Done/Partial/Failed | [tools] | [summary] |
| Compound Node ID | Done/Partial/Failed | [tools] | [summary] |
| Target Node ID | Done/Partial/Failed | [tools] | [summary] |
| Disease Node ID | Done/Partial/Failed | [tools] | [summary] |
| C-T Edges | Done/Partial/Failed | [tools] | [summary] |
| T-D Edges | Done/Partial/Failed | [tools] | [summary] |
| C-D Edges | Done/Partial/Failed | [tools] | [summary] |
| T-T Edges (PPI) | Done/Partial/Failed | [tools] | [summary] |
| Network Topology | Done/Partial/Failed | [computed] | [summary] |
| Network Proximity | Done/Partial/Failed | [computed] | [summary] |
| Pathway Enrichment | Done/Partial/Failed | [tools] | [summary] |
| Repurposing Candidates | Done/Partial/Failed | [tools] | [summary] |
| Mechanism Prediction | Done/Partial/Failed | [analysis] | [summary] |
| Polypharmacology | Done/Partial/Failed | [tools] | [summary] |
| Safety/Toxicity | Done/Partial/Failed | [tools] | [summary] |
| Clinical Precedent | Done/Partial/Failed | [tools] | [summary] |
| Literature Evidence | Done/Partial/Failed | [tools] | [summary] |
| Report Generation | Done/Partial/Failed | - | [summary] |
CTD tools: Return {data: [...]} with potentially large result sets.
Fallback Strategies
Phase
Primary Tool
Fallback 1
Fallback 2
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 interactions
Disease targets
OpenTargets disease targets
CTD gene-diseases
GWAS associations
PPI network
STRING interactions
OpenTargets interactions
IntAct interactions
Pathways
ReactomeAnalysis enrichment
enrichr enrichment
STRING functional enrichment
Clinical trials
search_clinical_trials
clinical_trials_search
PubMed clinical
Safety
FAERS + FDA
OpenTargets AEs
DrugBank safety
Literature
PubMed search
EuropePMC search
OpenTargets publications
Common Use Patterns
Pattern 1: Drug Repurposing via Network Proximity
Input: compound (metformin) + disease (Alzheimer disease)
Mode: compound-to-disease
Flow:
1. Resolve metformin -> CHEMBL1431, DB00331, CID:4091
2. Get metformin targets (OpenTargets, DrugBank, DGIdb)
3. Get Alzheimer disease genes (OpenTargets, GWAS)
4. Build PPI network (STRING, OpenTargets interactions)
5. Calculate proximity between drug targets and disease genes
6. Score and rank by Network Pharmacology Score
7. Predict mechanism via shared pathways
8. Validate with clinical trials and literature
Pattern 2: Disease-Driven Drug Discovery
Input: disease (lupus)
Mode: disease-to-compound
Flow:
1. Resolve lupus -> MONDO/EFO ID
2. Get disease-associated targets (top 50)
3. For each target, find approved drugs (OpenTargets, DGIdb, DrugBank)
4. Build C-T-D network from all drug-target-disease edges
5. Rank drugs by: number of disease targets hit, network proximity, safety
6. Identify polypharmacology advantages (drugs hitting multiple disease targets)
Pattern 3: Target-Centric Network
Input: target (EGFR)
Mode: target-centric
Flow:
1. Resolve EGFR -> ENSG00000146648
2. Get all compounds targeting EGFR (with bioactivity)
3. Get all diseases associated with EGFR
4. Build PPI network around EGFR
5. Identify which compounds could bridge to which diseases
6. Rank compound-disease pairs by network metrics
Pattern 4: Polypharmacology Profiling
Input: compound (aspirin)
Mode: bidirectional
Flow:
1. Resolve aspirin -> CHEMBL25
2. Get ALL targets (not just primary)
3. Map targets to disease modules
4. Identify multi-target coverage across diseases
5. Analyze synergistic vs antagonistic effects
6. Compare selectivity across target families