[Bioc-devel] GSVA and LumiBatch objects

Robert Castelo robert.castelo at upf.edu
Tue Jan 7 18:19:02 CET 2014


Hi Markus,

we did not test GSVA with LumiBatch objects before and that's the reason 
we did not encounter this problem. I've taken a brief look to the 
definition of the LumiBatch class of objects and my understanding of it 
is that it contains the ExpressionSet class, and therefore, all methods 
for ExpressionSet objects should work with LumiBatch objects.

when the input to the gsva() function is an ExpressionSet objects, 
internally, the matrix of -p genes by n sample- expression values is 
extracted via the "exprs" method and at the end of the function the 
input ExpressionSet object is copied and its pxn matrix of expression 
values is replaced by the resulting sxn matrix (s being here the number 
of gene sets) of gene set summaries of expression, via the "exprs<-" 
replacement method for ExpressionSet objects.

as far as i can tell from my brief look to the source code of the lumi 
package, where the LumiBatch class is defined, the "exprs" and "exprs<-" 
methods are not specifically defined again for LumiBatch objects so, and 
this should be the advantage of using S4 classes, everything should work 
out of the box.

if i just try to do the steps the gsva() function does, which i 
previously described, it does not work either outside the scope of the 
gsva() function. Using your example:


library(lumi)
library(GSVA)
library(GSVAdata)
library(lumiHumanAll.db)

data(example.lumi)
data(c2BroadSets)

res.matrix <- gsva(exprs(example.lumi), c2BroadSets,
     annotation=annotation(example.lumi))$es.obs

dim(res.matrix)
[1] 2986    4

res.eset <- example.lumi
exprs(res.eset) <- res.matrix
dim(res.eset)
Features  Samples
     8000        4


so, to me, since no error or warning is triggered and the result is not 
correct, something it is not working at the level of the definition of 
the replacement method for 'ExpressionSet' objects when the object is a 
LumiBatch object.

i'm cc'ing Martin Morgan who may have a hint about how to resolve this.

cheers,
robert.


On 12/30/2013 10:11 PM, Markus Riester wrote:
> Hi Justin,
>
> GSVA does not work correctly with LumiBatch objects. It does all the calculations, but then returns the original input data object, not the pathway collapsed version of the input data.
>
> library(lumi)
> library(GSVA)
> library(GSVAdata)
> library(lumiHumanAll.db)
>
> data(example.lumi)
> data(c2BroadSets)
>
> res.eset<- gsva(example.lumi, c2BroadSets)$es.obs
>
> res.matrix<- gsva(exprs(example.lumi), c2BroadSets,
>      annotation=annotation(example.lumi))$es.obs
>
>> dim(res.eset)
> Features  Samples
>      8000        4
>> dim(res.matrix)
> [1] 2986    4
>> sessionInfo()
> R version 3.0.2 (2013-09-25)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] parallel  stats     graphics  grDevices utils     datasets  methods
> [8] base
>
> other attached packages:
>   [1] lumiHumanAll.db_1.22.0 GSVAdata_0.99.11       hgu95a.db_2.10.1
>   [4] org.Hs.eg.db_2.10.1    RSQLite_0.11.4         DBI_0.2-7
>   [7] GSVA_1.10.1            GSEABase_1.24.0        graph_1.40.1
> [10] annotate_1.40.0        AnnotationDbi_1.24.0   lumi_2.14.1
> [13] Biobase_2.22.0         BiocGenerics_0.8.0     knitr_1.5
>
> loaded via a namespace (and not attached):
>   [1] affy_1.40.0            affyio_1.30.0          base64_1.1
>   [4] beanplot_1.1           BiocInstaller_1.12.0   biomaRt_2.18.0
>   [7] Biostrings_2.30.1      bitops_1.0-6           BSgenome_1.30.0
> [10] bumphunter_1.2.0       codetools_0.2-8        colorspace_1.2-4
> [13] digest_0.6.4           doRNG_1.5.5            evaluate_0.5.1
> [16] foreach_1.4.1          formatR_0.10           genefilter_1.44.0
> [19] GenomicFeatures_1.14.2 GenomicRanges_1.14.4   grid_3.0.2
> [22] illuminaio_0.4.0       IRanges_1.20.6         iterators_1.0.6
> [25] itertools_0.1-1        KernSmooth_2.23-10     lattice_0.20-24
> [28] limma_3.18.7           locfit_1.5-9.1         MASS_7.3-29
> [31] Matrix_1.1-0           matrixStats_0.8.12     mclust_4.2
> [34] methylumi_2.8.0        mgcv_1.7-27            minfi_1.8.9
> [37] multtest_2.18.0        nleqslv_2.1            nlme_3.1-113
> [40] nor1mix_1.1-4          pkgmaker_0.17.4        preprocessCore_1.24.0
> [43] R.methodsS3_1.5.2      RColorBrewer_1.0-5     RCurl_1.95-4.1
> [46] registry_0.2           reshape_0.8.4          rngtools_1.2.3
> [49] Rsamtools_1.14.2       rtracklayer_1.22.0     siggenes_1.36.0
> [52] splines_3.0.2          stats4_3.0.2           stringr_0.6.2
> [55] survival_2.37-4        tools_3.0.2            XML_3.95-0.2
> [58] xtable_1.7-1           XVector_0.2.0          zlibbioc_1.8.0
>
> Cheers,
> Markus
>
> --
> DFCI Biostatistics&  Computational Biology
> Office Location: Center for Life Science Building, Room 11052
>
> Phone: +1-617-582-7586
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

-- 
Robert Castelo, PhD
Associate Professor
Dept. of Experimental and Health Sciences
Universitat Pompeu Fabra (UPF)
Barcelona Biomedical Research Park (PRBB)
Dr Aiguader 88
E-08003 Barcelona, Spain
telf: +34.933.160.514
fax: +34.933.160.550



More information about the Bioc-devel mailing list