omics.co.in logo omics.co.in

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 / DatabaseUnderlying EnginePrimary StrengthClinical Application
STRING DatabaseCo-expression, experimental physical binding, text mining, databasesMassive coverage; probabilistic confidence score (\(\ge 0.700\) high confidence)Constructing core interactomes from DEG lists
Cytoscape & RCy3Open-source desktop graph theory visualization softwareForce-directed organic layouts, MCODE hub subclustering, multi-layer visual mappingPublication-quality network figures and modular topology
GeneMANIAFast heuristic algorithm integrating physical, genetic, and pathway dataPredicting related gene functions from seed gene setsIdentifying missing interactors in a disease pathway
X2K Web (Expression2Kinases)Reverse-engineering upstream regulatory networksConnects DEGs → Transcription Factors → Upstream KinasesPinpointing 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 chr1 or 1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.
📝 Propose Edit on GitHub ↗