# NOT RUN {
# }
# NOT RUN {
##Generate a vector of pvalues for a toy example
set.seed(159)
m<- 100
pvalues <- runif(m,0,1)^5
featureIDs <- as.character(1:m)
# perform a self-contained test for all features
setTest(pvalues, featureIDs, testype = "selfcontained")
# create 3 random pathway of size 60, 20 and 45
randpathlist=list(A=as.character(c(sample(1:m, 60))),
B=as.character(c(sample(1:m, 20))),
C=as.character(c(sample(1:m, 45))))
# get the seachart for the whole pathlist
S1<-SEA(pvalues, featureIDs, pathlist=randpathlist)
S1
# get the seachart for only first two pathways of the randpathlist
S2<-SEA(pvalues, featureIDs, pathlist=randpathlist, select=1:2)
S2
#sort the list by competitve p-value and select top 2
topSEA(S2, by=Comp.adjP, descending = FALSE, n=2)
#make an enrichment plot based on TDP.estimated of te pathways
#here pathways with more than 20% active signials will be identified
plotSEA(S1,threshold = 0.20,n=3)
# }
Run the code above in your browser using DataLab