##example 1
gl <- runif(100, min=0, max=5)
gl <- gl[order(gl, decreasing=TRUE)]
names(gl) <- as.character(sample(x=seq(from=1, to=100, by=1), size=100,
replace=FALSE))
gs1 <- sample(names(gl), size=20, replace=FALSE)
gs2 <- sample(names(gl), size=20, replace=FALSE)
gsc <- list(subset1=gs1, subset2=gs2)
GSCscores <- collectionGsea(collectionOfGeneSets=gsc, geneList=gl,
exponent=1, nPermutations=1000, minGeneSetSize=5)
GSCpvalues <- permutationPvalueCollectionGsea(permScores=
GSCscores$Permutation.scores, dataScores=GSCscores$Observed.scores)
##example 2
## Not run:
# library(org.Dm.eg.db)
# library(KEGG.db)
# ##load phenotype vector (see the vignette for details about the
# ##preprocessing of this data set)
# data("KcViab_Data4Enrich")
# DM_KEGG <- KeggGeneSets(species="Dm")
# GSCscores <- collectionGsea(collectionOfGeneSets=DM_KEGG, geneList=
# KcViab_Data4Enrich, exponent=1, nPermutations=1000, minGeneSetSize=100)
# GSCpvalues <- permutationPvalueCollectionGsea(permScores=
# GSCscores$Permutation.scores, dataScores=GSCscores$Observed.scores)
# ## End(Not run)
Run the code above in your browser using DataLab