DESeq2: error invalid class SummarizedExperiment object when creating DESeqDataSetFromMatrix
2
0
Entering edit mode
@jillianwaters-14491
Last seen 4.0 years ago

Hello,

I am trying to create the DESeqDataSetFromMatrix, and am receiving an error that there is an invalid class "summarizedExperiment" object. I initially thought there was something wrong with my input files, but I receive the same errors when I use the Pasilla dataset and enter in all code as outlined in the instructions here (http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#quick-start)

I have entered the input and full error below, as well as the sessionInfo().

Thank you for any help with this!

 

library("DESeq2")

dds <- DESeqDataSetFromMatrix(countData = cts,

                              colData = coldata,

                              design = ~ condition)

dds

 

Error in validObject(.Object): invalid class “SummarizedExperiment” object: undefined class for slot "NAMES" ("characterORNULL")
Traceback:

1. DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~condition)
2. SummarizedExperiment(assays = SimpleList(counts = countData),
.     colData = colData, ...)
3. SummarizedExperiment(assays = SimpleList(counts = countData),
.     colData = colData, ...)
4. .local(assays, ...)
5. new_SummarizedExperiment(assays, ans_rownames, rowData, colData,
.     metadata)
6. new("SummarizedExperiment", NAMES = names, elementMetadata = rowData,
.     colData = colData, assays = assays, metadata = as.list(metadata))
7. initialize(value, ...)
8. initialize(value, ...)
9. validObject(.Object)
10. stop(msg, ": ", errors, domain = NA)

 

R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS: /ebio/abt3_projects/Christensenella_Project/anaconda3/envs/R_DEseq2/lib/R/lib/libRblas.so
LAPACK: /ebio/abt3_projects/Christensenella_Project/anaconda3/envs/R_DEseq2/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

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

other attached packages:
 [1] BiocInstaller_1.28.0       BiocParallel_1.12.0       
 [3] DESeq2_1.18.1              SummarizedExperiment_1.4.0
 [5] Biobase_2.38.0             GenomicRanges_1.30.0      
 [7] GenomeInfoDb_1.14.0        IRanges_2.12.0            
 [9] S4Vectors_0.16.0           BiocGenerics_0.24.0       
[11] ggplot2_2.2.1              tidyr_0.6.3               
[13] dplyr_0.7.0               

loaded via a namespace (and not attached):
 [1] locfit_1.5-9.1          Rcpp_0.12.13            lattice_0.20-34        
 [4] assertthat_0.2.0        digest_0.6.12           IRdisplay_0.4.4        
 [7] R6_2.2.1                plyr_1.8.4              repr_0.10              
[10] acepack_1.4.1           RSQLite_1.1-2           evaluate_0.10          
[13] zlibbioc_1.24.0         rlang_0.1.2             lazyeval_0.2.0         
[16] uuid_0.1-2              annotate_1.56.0         rpart_4.1-10           
[19] Matrix_1.2-7.1          splines_3.4.1           geneplotter_1.56.0     
[22] stringr_1.2.0           foreign_0.8-67          RCurl_1.95-4.8         
[25] munsell_0.4.3           compiler_3.4.1          nnet_7.3-12            
[28] tibble_1.3.3            GenomeInfoDbData_0.99.1 Hmisc_3.14-6           
[31] XML_3.98-1.6            crayon_1.3.2            bitops_1.0-6           
[34] grid_3.4.1              jsonlite_1.5            xtable_1.8-2           
[37] gtable_0.2.0            DBI_0.6-1               magrittr_1.5           
[40] scales_0.4.1            stringi_1.1.2           XVector_0.18.0         
[43] genefilter_1.60.0       latticeExtra_0.6-28     IRkernel_0.7.1         
[46] Formula_1.2-1           RColorBrewer_1.1-2      tools_3.4.1            
[49] glue_1.1.1              survival_2.40-1         AnnotationDbi_1.40.0   
[52] colorspace_1.3-2        cluster_2.0.6           memoise_1.1.0          
[55] pbdZMQ_0.2-6 
deseq2 • 4.6k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 2 days ago
United States

Usually this is a problem associated with package versions from different Bioconductor releases; what does BiocInstaller::biocValid() say? If it looks clean, I'd suggest re-installing the packages (via biocLite()) SummarizedExperiment, GenomicRanges, IRanges, S4Vectors, XVector.

ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 10 hours ago
United States

Can you run biocLite() and update all packages until you get no errors from biocValid()? 

I can see you have an old version of SummarizedExperiment (the current version is 1.8). Bioconductor packages are designed to work all together based on consistent releases.

In the past, this error came up when there were mixed versions of software on the machine:

DESeqDataSetFromTximport: Error in checkSlotAssignment

ADD COMMENT
0
Entering edit mode

Dear Martin and Michael,

Thank you both so much for the prompt feedback! You are indeed correct: my packages were out of date. There were 28 packages that were old. I updated all of the packages and the issue is now resolved. 

I just want to make a note here in case anyone else stumbles upon this thread that is using Conda. I created a conda environment and downloaded these packages 2 months ago, and was naive to think these would be somewhat current versions.  

ADD REPLY
0
Entering edit mode

Strange, For example, 

SummarizedExperiment_1.4.0

Is from October 2016.

ADD REPLY
0
Entering edit mode

I edited the above, as I realize I had created that conda environment early October, and was thinking of a different environment that I created this week. Either way, this was a relatively recent install. Summarized Experiment was not installed directly by me, but would have been one of the dependencies from the other packages I installed.

When installing these packages, I went to the anaconda cloud site for each one, for example: https://anaconda.org/r/r-tidyr

ADD REPLY

Login before adding your answer.

Traffic: 535 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