GSVA
最后发布时间 : 2023-11-02 23:03:55
浏览量 :
GSVA(Gene set variation analysis)
library(GSVA)
p <- 10000 ## number of genes
n <- 30 ## number of samples
## simulate expression values from a standard Gaussian distribution
X <- matrix(rnorm(p*n), nrow=p,
dimnames=list(paste0("g", 1:p), paste0("s", 1:n)))
X[1:5, 1:5]
dim(X)
gs <- as.list(sample(10:100, size=100, replace=TRUE))
gs <- lapply(gs, function(n, p)
paste0("g", sample(1:p, size=n, replace=FALSE)), p)
names(gs) <- paste0("gs", 1:length(gs))
gsva.es <- gsva(X, gs, verbose=FALSE)
gsva.es[1:5, 1:5]
dim(gsva.es)