I am analyzing an Affymetrix array dataset. After RMA normalization the data is returned as an expressionSet
object. However, I am not able to replace the expression value 'slot' with some new data anymore, although this did work before (BioC 3.3). See example below. Any suggestions on how to do this in BioC 3.4? Thanks.
--> The normalized data I get is REFSEQ-based, but I am averaging (collapsing) the data on the level of ENTREZG IDs, which I then would like to 'put back' in the expressionSet
. The number of genes/features is reduced from ~60k to ~20k. All other (meta)data is not affected.
> library(Biobase) > sample.data <- ExpressionSet(assayData=matrix(runif(1000), nrow=100, ncol=10)) > sample.data ExpressionSet (storageMode: lockedEnvironment) assayData: 100 features, 10 samples element names: exprs protocolData: none phenoData: none featureData: none experimentData: use 'experimentData(object)' Annotation: > replacement <- matrix(runif(750), nrow=75, ncol=10) > exprs(sample.data) <- replacement Error in .validate_assayDataElementReplace(obj, value) : object and replacement value have different dimensions >
> sessionInfo() R version 3.3.1 Patched (2016-10-18 r71535) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] Biobase_2.34.0 BiocGenerics_0.20.0 >
I would like to fully replace the content; although the expression values for the 75 new IDs are based on those of the 100 old IDs, the identifiers as such are (also) different (refseq vs entrez).
After giving your 2nd suggestion some more thoughts, I think this would be the best approach of achieving what I want. Since I do have the fData and pData info anyway, it would be straight forward to just create a new expressionSet rather than to modify one.