CancerPPIr is an R workflow for patient-specific protein-protein interaction (PPI) subnetwork profiling from bulk RNA-seq-derived gene tables. It maps gene symbols to STRING protein identifiers, reconstructs a STRING-derived network, calculates topology metrics, detects deterministic Louvain modules, builds a canonical biological-evidence layer, and exports ranked protein and module priorities with audit-ready provenance.
CancerPPIr is a hypothesis-generation workflow. It does not establish therapeutic efficacy, druggability, tumor-cell dependency, or clinical actionability by itself.
- Reads a differential-expression table.
- Normalizes HGNC symbols and audits identifier changes.
- Maps genes to STRING v12 protein identifiers.
- Reconstructs a thresholded STRING-derived PPI subnetwork.
- Calculates node topology and a five-component exploratory candidate score.
- Detects deterministic Louvain modules.
- Performs offline enrichment from locally cached STRING v12 resources.
- Assigns canonical module evidence from marker and statistically significant enrichment support.
- Filters automatic priorities by entity and module eligibility.
- Writes analytical, technical, network, manifest, and checksum outputs.
The repository contains an renv.lock file. The reproducible installation path
is:
install.packages("renv")
renv::restore()Run commands from the repository root. STRING resources are stored in a cache folder supplied at run time and are not committed to the repository.
See the installation guide for details.
The input is a delimited text file with three required variables:
| Canonical variable | Meaning |
|---|---|
gene |
HGNC gene symbol |
logFC |
log-fold change |
pvalue |
p-value, adjusted p-value, or FDR supplied by the user |
Recognized alternatives include gene_symbol, symbol, log2FC,
log2FoldChange, pval, padj, adj_pvalue, and fdr. When no recognized
headers are found, CancerPPIr treats the first three columns as pvalue,
logFC, and gene, in that order.
Minimal example:
pvalue,logFC,gene
0.00012,2.31,PTPRC
0.00450,1.74,CXCL9
0.01800,-1.26,COL1A1A synthetic, non-patient example is provided in
examples/minimal_input.csv.
Display the executable CLI contract:
Rscript cancerppir.R --helpRun an analysis:
Rscript cancerppir.R examples/minimal_input.csv results string_cache 400 30 TRUE| Position | Argument | Requirement |
|---|---|---|
| 1 | input.csv |
Delimited input gene table |
| 2 | results_dir |
Root output directory |
| 3 | string_cache |
Local STRING cache directory |
| 4 | score_threshold |
Optional integer from 1 to 1000; default 400 |
| 5 | top_n |
Optional positive integer; default 30 |
| 6 | run_enrichment |
Optional TRUE or FALSE; default TRUE |
The case folder is derived from the input basename. For example,
examples/minimal_input.csv is written to results/minimal_input/.
See the complete CLI contract.
source("R/load_all.R")
load_cancerppir_modules(project_root = ".", envir = .GlobalEnv)
result <- run_cancerppir(
input_file = "examples/minimal_input.csv",
results_root = "results",
cache_dir = "string_cache",
score_threshold = 400L,
top_n = 30L,
run_enrichment = TRUE
)result is a cancerppir_result object with separate network, biological
evidence, priorities, reports, provenance, file inventory, mapping, and
compatibility sections.
Every successful run writes six principal files:
| File | Primary use |
|---|---|
CancerPPIr_Analytical_Report.xlsx |
Concise human-readable interpretation layer |
CancerPPIr_Technical_Report.xlsx |
Complete mapping, metrics, enrichment, evidence, and session audit |
Network_for_Cytoscape.graphml |
Canonical annotated network for Cytoscape or Gephi |
STRING_links.txt |
Current and STRING v12-pinned inspection links |
CancerPPIr_Output_Manifest.json |
Machine-readable provenance and output inventory |
CancerPPIr_Output_Checksums.sha256 |
SHA-256 integrity verification |
The analytical workbook has exactly six sheets, in this order:
Executive summaryFinal prioritiesModule prioritiesCandidate evidenceNetwork overviewMethods and limitations
The canonical biological-evidence sheets in the technical workbook are:
Module annotationsRule evidenceSignificant termsNode annotationsValidation
Start with the analytical workbook. Use the technical workbook and manifest to audit how a result was produced. See the output contract.
candidate_score is an exploratory within-network ranking that combines
normalized degree, betweenness, log-transformed stress centrality, absolute
logFC, and -log10(pvalue). Its five components are exposed in Candidate evidence and GraphML.
Automatic final priorities require both:
- a review-ready entity classification; and
- a biological module that passes confidence, conflict, and significant-evidence checks.
A high candidate rank is not proof of therapeutic actionability. Read protein rank together with module context, eligibility, warning fields, pathology, and independent molecular or clinical evidence.
CancerPPIr uses pinned local STRING v12 resources for network construction and enrichment. The first environment setup may require downloading large files; subsequent runs reuse the cache. Standard manifests record cache basenames and sizes without re-reading multi-gigabyte resources solely to hash them.
The JSON manifest records public schema versions, input SHA-256, Git metadata when available, R and package versions, analysis parameters, run summary, and SHA-256 values for the four principal analysis outputs. The checksum file also hashes the manifest.
All public output schemas begin at 1.0.0 for the first public release line and
are versioned independently. See
schema versioning.
Additional guidance:
- Output interpretation
- Annotation rules
- Clinical interpretation
- Clinical and analytical limitations
- Glossary
- Reproducibility
- Historical output-schema migration
- Documentation index
Citation metadata are provided in CITATION.cff. GitHub renders
these metadata through Cite this repository. Cite the archived software
release used in the analysis and the associated article when available.
Current stable version: 1.0.0.
CancerPPIr is distributed under the MIT License.
Bulk RNA-seq profiles combine malignant and non-malignant specimen components. STRING edges are database-derived associations, not patient-specific physical interaction measurements. CancerPPIr results must be integrated with pathology, tumor purity, genomic alterations, protein-level evidence, druggability, experimental models, and clinical literature before translational conclusions are made.