Hi there,
I am trying to get the ssgsea algorithm running that is in the gsva package. I am reading an affymatrix dataset for this, convert it to an ExpressionSet object and then run the function. However, I get this error :
allFiles <- list.files('./affymatrix/TisMix_WTGene1_CEL/',full.names=TRUE,pattern = "\\.CEL$")
Data<-ReadAffy(filenames = allFiles)
expressionSet <-rma(Data)
result <- gsva(expressionSet,'ssgsea')
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘gsva’ for signature ‘"ExpressionSet", "character"’
Any ideas? GSVA documentation says it can be an expressionSet.
How do I get the gset.idx.list when reading the data from CEL files?
You don't. The gset.idx.list is something that you have to supply yourself. This can be a list object, or a GeneSetCollection. The GeneSetCollection is defined in the GSEAbase package, and you can use that package to make GeneSetCollections, or to get them from e.g., the Broad Institute. See the GSEAbase vignette for more information.
GSVA transforms a gene-by-sample expression data matrix into a geneset-by-sample expression data matrix. You should know beforehand what gene sets are do you want to use and this depends on your research question at hand. The GSVA package itself has the C2 collection of MSigDB gene sets version 3.0 that you can load by typing:
data(c2BroadSets)
Section 4 of the GSVA vignette gives an example using those gene sets.