Question: Modifying eset@assayData$exprs : Error : cannot change value of locked binding for 'exprs'
gravatar for giroudpaul
2.6 years ago by
giroudpaul30 wrote:


I retrieved an expression set (Illumina HumanHT-12 V3.0) using GEOquery, but I noticed that the expr value where not in log2...

So I tried to do it myself but got an error and since I am no R expert, I don't know much about environment, so I don't know how to solve this. Any idea ? Thanks !

Code :

> eset <- getGEO("GSE35449", GSEMatrix = TRUE)[[1]]
> eset@assayData$exprs <- log2(eset@assayData$exprs)
Error in eset@assayData$exprs <- log2(eset@assayData$exprs) : 
  cannot change value of locked binding for 'exprs'
> sessionInfo()
R version 3.2.4 Revised (2016-03-16 r70336)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252   
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C                  
[5] LC_TIME=French_France.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] NMF_0.23.3          cluster_2.0.4       rngtools_1.2.4      pkgmaker_0.25.10   
 [5] registry_0.3        limma_3.26.9        GEOquery_2.36.0     Biobase_2.30.0     
 [9] BiocGenerics_0.16.1 ggplot2_2.1.0      

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.4        whisker_0.3-2      magrittr_1.5       splines_3.2.4     
 [5] doParallel_1.0.10  munsell_0.4.3      gridBase_0.4-7     colorspace_1.2-6  
 [9] xtable_1.8-2       foreach_1.4.3      stringr_1.0.0      plyr_1.8.3        
[13] tools_3.2.4        grid_3.2.4         gtable_0.2.0       iterators_1.0.8   
[17] digest_0.6.9       reshape2_1.4.1     RColorBrewer_1.1-2 bitops_1.0-6      
[21] codetools_0.2-14   RCurl_1.95-4.8     dendextend_1.1.8   stringi_1.0-1     
[25] scales_0.4.0       XML_3.98-1.4      


ADD COMMENTlink modified 2.6 years ago by Steve Lianoglou12k • written 2.6 years ago by giroudpaul30
gravatar for Steve Lianoglou
2.6 years ago by
Steve Lianoglou12k wrote:

In general you don't want to go digging into the $'s and the @'s of objects, but rather get to them via their accessor functions. Take the time to read through the introductory vignettes in the Biobase package to orient yourself with ExpressionSet objects. In the meantime, you might try something like "exprs(eset) <- log2(exprs(eset))"

But you probably still don't want to do that since you should normalize this data (perhaps rma -- are these affy arrays?) in a more standard/robust manner

ADD COMMENTlink written 2.6 years ago by Steve Lianoglou12k

As I said, it is an illumina array dataset, boxplot shows that the normalization has already been done.

The trouble is if I want to identify DE genes based on my contrasts, I need to use lmFit and eBayes from limma.

It's true that I could work my way around doing lmFit(log2(exprs(eset))) (Since I noticed lmFit accept a matrix and not a whole ExpressionSet).

I still wonder if it's really impossible to change the eset@assayData$exprs (as I can for example easily modify gset@phenoData@data for example)

ADD REPLYlink written 2.6 years ago by giroudpaul30

Steve indicated that you should use the accessors rather than direct access. So for instance update your object with exprs(eset) = log2(exprs(eset)), and pData(gset) = ....

ADD REPLYlink written 2.6 years ago by Martin Morgan ♦♦ 22k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 142 users visited in the last hour