This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Question: can not obtain DESeq2 results

Dear all, I am trying to run DESeq2 to get the list of differential expressed genes between tumor and normal samples. However I could not get result:

code:

group=c(rep("normal",39),rep("tumor",81))
condition <- factor(group,levels = c("normal","tumor"))
coldata <- data.frame(row.names=colnames(data), condition)
dds <- DESeqDataSetFromMatrix(countData = data, colData = coldata, design= ~ condition )
dds <- DESeq(dds) 
res <- results(dds, contrast=c("condition","normal","tumor"))

error info:

resultsNames(dds)
[1] "Intercept"                 "condition_tumor_vs_normal"

res <- results(dds, name ="condition_tumor_vs_normal")
Error in .wrap_in_length_one_list_like_object(value, name, x) : failed to coerce 'list(value)' to a DESeqResults object of length 1

res <- results(dds, contrast=c("condition","normal","tumor"))
Error in .wrap_in_length_one_list_like_object(value, name, x) : failed to coerce 'list(value)' to a DESeqResults object of length 1

I don't know mistakes in my code and I would appreciate any suggestions.

Zongjun

rna-seq deseq2

Did you try googling? Put up your sessionInfo.

yes, but found no tips

I uninstalled 14 too new package, and reinstalled "DESeq2" and dependent package use BiocManager::install, error remains unsolved.

> res <- results(dds, contrast=c("condition","normal","tumor"))

Error in .wrap_in_length_one_list_like_object(value, name, x) : 
  failed to coerce 'list(value)' to a DESeqResults object of length 1

> BiocManager::valid()
[1] TRUE

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] zh_CN.UTF-8/zh_CN.UTF-8/zh_CN.UTF-8/C/zh_CN.UTF-8/zh_CN.UTF-8

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

other attached packages:
 [1] DESeq2_1.24.0               lattice_0.20-41             locfit_1.5-9.4             
 [4] limma_3.40.6                SummarizedExperiment_1.14.1 DelayedArray_0.10.0        
 [7] BiocParallel_1.18.1         matrixStats_0.56.0          Biobase_2.44.0             
[10] GenomicRanges_1.36.1        GenomeInfoDb_1.20.0         IRanges_2.18.3             
[13] S4Vectors_0.22.1            BiocGenerics_0.30.0        

loaded via a namespace (and not attached):
 [1] bit64_0.9-7            splines_3.6.3          Formula_1.2-3          BiocManager_1.30.10   
 [5] latticeExtra_0.6-29    blob_1.2.1             GenomeInfoDbData_1.2.1 pillar_1.4.6          
 [9] RSQLite_2.2.0          backports_1.1.8        glue_1.4.1             digest_0.6.25         
[13] RColorBrewer_1.1-2     XVector_0.24.0         checkmate_2.0.0        colorspace_1.4-1      
[17] htmltools_0.5.0        Matrix_1.2-18          XML_3.99-0.3           pkgconfig_2.0.3       
[21] genefilter_1.66.0      zlibbioc_1.30.0        purrr_0.3.4            xtable_1.8-4          
[25] scales_1.1.1           jpeg_0.1-8.1           htmlTable_2.0.1        tibble_3.0.3          
[29] annotate_1.62.0        generics_0.0.2         ggplot2_3.3.2          ellipsis_0.3.1        
[33] nnet_7.3-14            survival_3.2-3         magrittr_1.5           crayon_1.3.4          
[37] memoise_1.1.0          foreign_0.8-75         tools_3.6.3            data.table_1.12.8     
[41] lifecycle_0.2.0        stringr_1.4.0          munsell_0.5.0          cluster_2.1.0         
[45] AnnotationDbi_1.46.1   compiler_3.6.3         rlang_0.4.7            grid_3.6.3            
[49] RCurl_1.98-1.2         rstudioapi_0.11        htmlwidgets_1.5.1      bitops_1.0-6          
[53] base64enc_0.1-3        gtable_0.3.0           DBI_1.1.0              R6_2.4.1              
[57] gridExtra_2.3          knitr_1.29             dplyr_1.0.0            bit_1.1-15.2          
[61] Hmisc_4.4-0            stringi_1.4.6          Rcpp_1.0.5             geneplotter_1.62.0    
[65] vctrs_0.3.1            rpart_4.1-15           acepack_1.4.1          png_0.1-7             
[69] tidyselect_1.1.0       xfun_0.15

2 answers

Thanks everyone, I have resolved the problem. Upgrade the Bioconductor(3.9->3.10), and together 50 packages were updated. The version of DESeq2 was upgrade from 1.24 to 1.26, then the error disappeared.

For my case, I re-installed the Rcpp package and solved the problem.

Log in to answer this question.