# NOT RUN {
# load depend package.
require(GSVA)
require(parallel)
# get breast cancer disease subtype gene expression profile.
Bregenematrix<-get("Subgenematrix")
# get path of the sample disease subtype files.
Subtypelabels<- system.file("extdata", "Sublabels.cls", package = "psSubpathway")
# }
# NOT RUN {
SubSEA(Bregenematrix,input.cls=Subtypelabels,nperm=50,fdr.th=0.01,parallel.sz=2)
# }
# NOT RUN {
# get the result of the SubSEA function
SubSEAresult<-get("Subspwresult")
str(SubSEAresult)
head(SubSEAresult$Basal)
# Simulated gene matrix
genematrix <- matrix(rnorm(500*40), nrow=500, dimnames=list(1:500, 1:40))
# Construct subpathway list data.
subpathwaylist <- as.list(sample(2:100, size=20, replace=TRUE))
subpathwaylist <- lapply(subpathwaylist, function(n) sample(1:500, size=n, replace=FALSE))
names(subpathwaylist)<-c(paste(rep("spw",20),c(1:20)))
# Construct sample labels data.
subtypelabel<-list(phen=c("subtype1","subtype2","subtype3","subtype4"),
class.labes=c(rep("subtype1",10),rep("subtype2",10),
rep("subtype3",10),rep("subtype4",10)))
SubSEAcs<-SubSEA(genematrix,subtypelabel,subpathwaylist,nperm=10,parallel.sz=1)
str(SubSEAcs)
# }
Run the code above in your browser using DataLab