Combining ExpressionSet objects : error with function merge() in "inSilicoMerging"
1
1
Entering edit mode
alakatos ▴ 130
@alakatos-6983
Last seen 4.6 years ago
United States

Hello All,

I would like to combine 2 ExpressionSet objects into one  dataset.

My objects have identical numbers of featureNames, distinct sampleNames, identical pData variables and identical annotation.

Any help is highly appreciated.

Thank you in advance.

Anita

eset1:

ExpressionSet (storageMode: lockedEnvironment)
assayData: 24600 features, 16 samples
  element names: exprs
protocolData
  rowNames: 0215F-02_01AD1_(MTA-1_0).CEL 0215F-02_WT1_(MTA-1_0).CEL ... 0215F-02_19-AD4_(MTA-1_0).CEL (16 total)
  varLabels: exprs dates
  varMetadata: labelDescription channel
phenoData
  rowNames: 0215F-02_01AD1_(MTA-1_0).CEL 0215F-02_WT1_(MTA-1_0).CEL ... 0215F-02_19-AD4_(MTA-1_0).CEL (16 total)
  varLabels: Affym_R_pheno_ID Nanosting_ID .. (24 total)
  varMetadata: labelDescription
featureData
  featureNames: TC0100000005.mm.1 TC0100000014.mm.1 ... TSUnmapped00000186.mm.1 (24600 total)
  fvarLabels: ID Symbol ... Entrez (5 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: mta10sttranscriptcluster.db 

eset2

ExpressionSet (storageMode: lockedEnvironment)
assayData: 24600 features, 10 samples 
  element names: exprs 
protocolData
  rowNames: 0615F-03_CR5x435_(MTA-1_0).CEL 0615F-03_CR5x437_(MTA-1_0).CEL ... 0615F-03_D_201_(MTA-1_0).CEL (10 total)
  varLabels: exprs dates
  varMetadata: labelDescription channel
phenoData
  rowNames: 0615F-03_CR5x435_(MTA-1_0).CEL 0615F-03_CR5x437_(MTA-1_0).CEL ... 0615F-03_D_201_(MTA-1_0).CEL (10 total)
  varLabels: Affym_R_pheno_ID Nanosting_ID ..(24 total)
  varMetadata: labelDescription
featureData
  featureNames: TC0100000005.mm.1 TC0100000014.mm.1 ... TSUnmapped00000186.mm.1 (24600 total)
  fvarLabels: ID Symbol ... Entrez (5 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: mta10sttranscriptcluster.db 

code:

>  esets <- consolidate(eset1, eset2)  or esets <- list(eset1, eset2)
> library(inSilicoMerging)
> eset_COMBAT = merge(esets, method="COMBAT");
Error in data.frame(<S4 object of class "ExpressionSet">, <S4 object of class "ExpressionSet">,  : 
  arguments imply differing number of rows: 16, 10
> sessionInfo()
R version 3.2.0 (2015-04-16)
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  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] affy_1.46.1                       annotate_1.46.1                   XML_3.98-1.3                      RColorBrewer_1.1-2               
 [5] corrplot_0.73                     Heatplus_2.14.0                   pd.mta.1.0_3.12.0                 oligo_1.32.0                     
 [9] Biostrings_2.36.1                 XVector_0.8.0                     WGCNA_1.47                        fastcluster_1.1.16               
[13] impute_1.42.0                     doParallel_1.0.8                  iterators_1.0.7                   foreach_1.4.2                    
[17] reshape_0.8.5                     Hmisc_3.16-0                      Formula_1.2-1                     survival_2.38-3                  
[21] lattice_0.20-33                   flashClust_1.01-2                 dynamicTreeCut_1.62               cluster_2.0.1                    
[25] mta10sttranscriptcluster.db_8.3.1 org.Mm.eg.db_3.1.2                AnnotationDbi_1.30.1              GenomeInfoDb_1.4.1               
[29] IRanges_2.2.5                     S4Vectors_0.6.1                   biomaRt_2.24.0                    convert_1.44.0                   
[33] marray_1.46.0                     gplots_2.17.0                     ggplot2_1.0.1                     GGally_0.5.0                     
[37] hwriter_1.3.2                     ReportingTools_2.8.0              RSQLite_1.0.0                     DBI_0.3.1                        
[41] knitr_1.10.5                      oligoClasses_1.30.0               limma_3.24.13                     sva_3.14.0                       
[45] genefilter_1.50.0                 mgcv_1.8-6                        nlme_3.1-121                      inSilicoMerging_1.12.0           
[49] Biobase_2.28.0                    BiocGenerics_0.14.0              

loaded via a namespace (and not attached):
 [1] colorspace_1.2-6          biovizBase_1.16.0         futile.logger_1.4.1       RcppArmadillo_0.5.200.1.0 GenomicRanges_1.20.5      dichromat_2.0-0          
 [7] affyio_1.36.0             codetools_0.2-14          splines_3.2.0             R.methodsS3_1.7.0         ggbio_1.16.1              geneplotter_1.46.0       
[13] Rsamtools_1.20.4          GO.db_3.1.2               R.oo_1.19.0               graph_1.46.0              GOstats_2.34.0            Matrix_1.2-0             
[19] acepack_1.3-3.3           tools_3.2.0               gtable_0.1.2              Category_2.34.2           affxparser_1.40.0         reshape2_1.4.1           
[25] Rcpp_0.11.6               preprocessCore_1.30.0     gdata_2.17.0              rtracklayer_1.28.6        stringr_1.0.0             proto_0.3-10             
[31] gtools_3.5.0              edgeR_3.10.2              zlibbioc_1.14.0           MASS_7.3-43               scales_0.2.5              BSgenome_1.36.2          
[37] VariantAnnotation_1.14.6  BiocInstaller_1.18.3      RBGL_1.44.0               lambda.r_1.1.7            gridExtra_2.0.0           rpart_4.1-10             
[43] latticeExtra_0.6-26       stringi_0.5-5             GenomicFeatures_1.20.1    caTools_1.17.1            BiocParallel_1.2.9        matrixStats_0.14.2       
[49] bitops_1.0-6              GenomicAlignments_1.4.1   bit_1.1-12                GSEABase_1.30.2           AnnotationForge_1.10.1    plyr_1.8.3               
[55] magrittr_1.5              DESeq2_1.8.1              foreign_0.8-63            RCurl_1.95-4.7            nnet_7.3-9                futile.options_1.0.0     
[61] KernSmooth_2.23-14        OrganismDbi_1.10.0        PFAM.db_3.1.2             locfit_1.5-9.1            digest_0.6.8              xtable_1.7-4             
[67] ff_2.2-13                 R.utils_2.1.0             munsell_0.4.2            
 

>

combine expresiondataset insilicomerging • 2.3k views
ADD COMMENT
0
Entering edit mode

When providing code, please give us exactly what code you used. For instance this line

>  esets <- consolidate(eset1, eset2)  or esets <- list(eset1, eset2)

Is super unhelpful, because nobody knows what you did. I have never heard of the consolidate() function, so have no idea what it does, nor why you would use it in lieu of list(). In addition, which one did you use? The code you supply should be clarifying, not mystifying.

In addition, it is helpful to give the output from running traceback() right after the error, so people can see where the error occured.

 

ADD REPLY
0
Entering edit mode
alakatos ▴ 130
@alakatos-6983
Last seen 4.6 years ago
United States

I found the  solution.  Package ‘a4Base’  does the work.

library(a4Base)
test < -combineTwoExpressionSet(eset1, eset2)

 

 
ADD COMMENT

Login before adding your answer.

Traffic: 619 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6