Chapter 12: Molecular Interaction Networks: Cytoscape, STRING, GeneMANIA & X2K
Tested Stacks:
GATK 4.6.1
Samtools 1.21
Nextflow 24.10
Seurat v5.1
Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
📚 Chapter 12 of 18
0% Course Completed
1. Network Biology & Protein-Protein Interactions (PPI)
Genes and proteins do not operate in isolation; they function as intricate, interconnected biological networks. In scale-free biological networks, a small fraction of highly connected hub genes and bottleneck proteins regulate global cellular phenotype, apoptosis, and therapeutic drug sensitivity.
| Network Tool / Database | Underlying Engine | Primary Strength | Clinical Application |
|---|---|---|---|
| STRING Database | Co-expression, experimental physical binding, text mining, databases | Massive coverage; probabilistic confidence score (\(\ge 0.700\) high confidence) | Constructing core interactomes from DEG lists |
| Cytoscape & RCy3 | Open-source desktop graph theory visualization software | Force-directed organic layouts, MCODE hub subclustering, multi-layer visual mapping | Publication-quality network figures and modular topology |
| GeneMANIA | Fast heuristic algorithm integrating physical, genetic, and pathway data | Predicting related gene functions from seed gene sets | Identifying missing interactors in a disease pathway |
| X2K Web (Expression2Kinases) | Reverse-engineering upstream regulatory networks | Connects DEGs → Transcription Factors → Upstream Kinases | Pinpointing druggable master kinase inhibitors |
2. Programmatic Network Construction & Graph Centrality in R
library(STRINGdb)
library(igraph)
# 1. Initialize STRING Database Connection (Human, Confidence score >= 700)
string_db <- STRINGdb$new(
version = "12.0",
species = 9606,
score_threshold = 700,
input_directory = tempdir()
)
# 2. Map DEGs to STRING Protein Identifiers
top_deg_symbols <- data.frame(gene = head(res_clean$Gene_Symbol, 100))
mapped_proteins <- string_db$map(top_deg_symbols, "gene", removeUnmappedRows = TRUE)
# 3. Retrieve Interaction Edges and Construct igraph Object
interactions <- string_db$get_interactions(mapped_proteins$STRING_id)
net <- graph_from_data_frame(d = interactions, directed = FALSE)
net <- simplify(net) # Remove self-loops and multi-edges
# 4. Topological Centrality Metrics
degree_centrality <- degree(net)
betweenness_centrality <- betweenness(net)
hub_table <- data.frame(
STRING_ID = names(degree_centrality),
Degree = degree_centrality,
Betweenness = round(betweenness_centrality, 1)
) %>% arrange(desc(Degree))
cat("Top 5 Critical Network Hubs:\n")
print(head(hub_table, 5))
⚠️
Common Pitfalls & Troubleshooting Checklist
- Java Heap Exhaustion (GATK / Picard): If processes terminate with
java.lang.OutOfMemoryError, set your environment variable explicitly:export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp". - Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with
samtools index -@ 4 sample.bam. - Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority:
conda config --set channel_priority strict. - Chromosome Naming Contamination: Always verify whether reference FASTA headers use
chr1or1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.