Internal function that runs Gene Set Variation Analysis
(gsva) on an expression matrix using the cached CTD
chemical gene sets. Unlike ORA/GSEA/CAMERA — which return a single
p-value per chemical (group-level inference) — GSVA produces a matrix
of per-sample enrichment scores: one row per chemical, one column
per sample. These scores are suitable for downstream clustering,
association tests against phenotypes, survival analysis, or heatmap
visualization.
Arguments
- expr
Numeric expression matrix (genes x samples).
rownames(expr)must be Entrez IDs or HGNC symbols matching the cached CTD gene sets.- id_type
Either
"entrez","symbol", orNULLfor auto-detection fromrownames(expr).- cache_dir
Directory holding the cached CTD
.rdafiles.- ...
Forwarded to
gsvaParam(e.g.kcdf,minSize,maxSize,tau,maxDiff).