Search
Question: results function of DESeq2 devel fails
0
gravatar for matthias.zytnicki
5 days ago by
matthias.zytnicki0 wrote:

I tried to follow the DESeq2 tutorial, and ended up with a error.

library("pasilla")
library("DESeq2")
pasCts <- system.file("extdata", "pasilla_gene_counts.tsv", package="pasilla", mustWork=TRUE)
pasAnno <- system.file("extdata", "pasilla_sample_annotation.csv", package="pasilla", mustWork=TRUE)
cts <- as.matrix(read.csv(pasCts,sep="\t",row.names="gene_id"))
coldata <- read.csv(pasAnno, row.names=1)
coldata <- coldata[,c("condition","type")]
rownames(coldata) <- sub("fb", "", rownames(coldata))
cts <- cts[, rownames(coldata)]
dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ condition)
featureData <- data.frame(gene=rownames(cts))
mcols(dds) <- DataFrame(mcols(dds), featureData)
dds <- DESeq(dds)
res <- results(dds)

The error is:

Error in concatenateObjects(x, objects, ignore.mcols = ignore.mcols) :
  the objects to concatenate must be DESeqResults objects (or NULLs)

Should I wait the new version? Is the new version different from the previous ones?

R Under development (unstable) (2018-01-08 r74099)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale:
 [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8    
 [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
 [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] DESeq2_1.19.14             SummarizedExperiment_1.9.5
 [3] DelayedArray_0.5.15        BiocParallel_1.13.1       
 [5] matrixStats_0.52.2         Biobase_2.39.1            
 [7] GenomicRanges_1.31.3       GenomeInfoDb_1.15.1       
 [9] IRanges_2.13.5             S4Vectors_0.17.17         
[11] BiocGenerics_0.25.1        pasilla_1.7.0             

loaded via a namespace (and not attached):
 [1] genefilter_1.61.0      locfit_1.5-9.1         splines_3.5.0         
 [4] lattice_0.20-35        colorspace_1.3-2       htmltools_0.3.6       
 [7] base64enc_0.1-3        blob_1.1.0             survival_2.41-3       
[10] XML_3.98-1.9           rlang_0.1.6            pillar_1.0.1          
[13] DBI_0.7                foreign_0.8-70         bit64_0.9-7           
[16] RColorBrewer_1.1-2     GenomeInfoDbData_1.1.0 plyr_1.8.4            
[19] stringr_1.2.0          zlibbioc_1.25.0        munsell_0.4.3         
[22] gtable_0.2.0           htmlwidgets_0.9        memoise_1.1.0         
[25] latticeExtra_0.6-28    knitr_1.18             geneplotter_1.57.0    
[28] AnnotationDbi_1.41.4   htmlTable_1.11.1       Rcpp_0.12.14          
[31] acepack_1.4.1          xtable_1.8-2           scales_0.5.0          
[34] backports_1.1.2        checkmate_1.8.5        Hmisc_4.1-1           
[37] annotate_1.57.2        XVector_0.19.1         bit_1.1-12            
[40] gridExtra_2.3          ggplot2_2.2.1          digest_0.6.13         
[43] stringi_1.1.6          grid_3.5.0             tools_3.5.0           
[46] bitops_1.0-6           magrittr_1.5           RSQLite_2.0           
[49] lazyeval_0.2.1         RCurl_1.95-4.10        tibble_1.4.1          
[52] Formula_1.2-2          cluster_2.0.6          Matrix_1.2-12         
[55] data.table_1.10.4-3    rstudioapi_0.7         rpart_4.1-12          
[58] nnet_7.3-12            compiler_3.5.0

BTW: thanks a lot to the DESeq2 team. You are doing a wonderful job.

ADD COMMENTlink written 5 days ago by matthias.zytnicki0

I get this same error for my devel branch packages. I'll look into it today.

ADD REPLYlink written 5 days ago by Michael Love15k

I haven't figured a solution but I have a minimal example. The problem comes when I try to add the padj column to res:

res$padj <- padj

Where res is a DESeqResults object, which contains DataFrame.

I get the same error with this simple example:

setClass("myDataFrame", contains="DataFrame")
d <- DataFrame(x=1:5)
dd <- new("myDataFrame", d)
d$y <- 1:5
dd$y <- 1:5
Error in concatenateObjects(x, objects, ignore.mcols = ignore.mcols) : 
  the objects to concatenate must be myDataFrame objects (or NULLs)
Calls: $<- ... c -> .local -> concatenateObjects -> concatenateObjects

With this traceback():

> traceback()
19: stop(wmsg("the objects to concatenate must be ", class(.Object), 
        " objects (or NULLs)"))
18: concatenateObjects(x, objects, ignore.mcols = ignore.mcols)
17: concatenateObjects(x, objects, ignore.mcols = ignore.mcols)
16: .local(x, ...)
15: c(x, value)
14: c(x, value)
13: coerce2(c(x, value), x)
12: coerce2(c(x, value), x)
11: .append_list_element(x, value, name)
10: setListElement(x, i, value)
9: setListElement(x, i, value)
8: .nextMethod(x, i, value = value)
7: eval(call, callEnv)
6: eval(call, callEnv)
5: callNextMethod(x, i, value = value)
4: `[[<-`(`*tmp*`, name, value = 1:5)
3: `[[<-`(`*tmp*`, name, value = 1:5)
2: `$<-`(`*tmp*`, y, value = 1:5)
1: `$<-`(`*tmp*`, y, value = 1:5)

> sessionInfo()
R Under development (unstable) (2017-12-07 r73859)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /Users/love/bin/R/lib/libRblas.dylib
LAPACK: /Users/love/bin/R/lib/libRlapack.dylib

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

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

other attached packages:
 [1] apeglm_1.1.9               DESeq2_1.19.15            
 [3] airway_0.113.0             SummarizedExperiment_1.9.5
 [5] DelayedArray_0.5.15        BiocParallel_1.13.1       
 [7] matrixStats_0.52.2         Biobase_2.39.1            
 [9] GenomicRanges_1.31.3       GenomeInfoDb_1.15.1       
[11] IRanges_2.13.5             S4Vectors_0.17.17         
[13] BiocGenerics_0.25.1        BiocInstaller_1.29.3      
[15] rmarkdown_1.8              testthat_2.0.0            
[17] devtools_1.13.4           

loaded via a namespace (and not attached):
 [1] bit64_0.9-7            splines_3.5.0          Formula_1.2-2         
 [4] latticeExtra_0.6-28    blob_1.1.0             GenomeInfoDbData_1.1.0
 [7] numDeriv_2016.8-1      pillar_1.0.1           RSQLite_2.0           
[10] backports_1.1.1        lattice_0.20-35        bbmle_1.0.20          
[13] digest_0.6.12          RColorBrewer_1.1-2     XVector_0.19.1        
[16] checkmate_1.8.5        colorspace_1.3-2       htmltools_0.3.6       
[19] Matrix_1.2-12          plyr_1.8.4             XML_3.98-1.9          
[22] emdbook_1.3.9          genefilter_1.61.0      zlibbioc_1.25.0       
[25] xtable_1.8-2           scales_0.5.0           htmlTable_1.11.1      
[28] tibble_1.4.1           annotate_1.57.2        ggplot2_2.2.1         
[31] withr_2.1.1            nnet_7.3-12            lazyeval_0.2.1        
[34] survival_2.41-3        magrittr_1.5           memoise_1.1.0         
[37] evaluate_0.10.1        MASS_7.3-48            xml2_1.1.1            
[40] foreign_0.8-70         tools_3.5.0            data.table_1.10.4-3   
[43] stringr_1.2.0          locfit_1.5-9.1         munsell_0.4.3         
[46] cluster_2.0.6          AnnotationDbi_1.41.4   compiler_3.5.0        
[49] rlang_0.1.6            grid_3.5.0             RCurl_1.95-4.8        
[52] rstudioapi_0.7         htmlwidgets_0.9        bitops_1.0-6          
[55] base64enc_0.1-3        gtable_0.2.0           roxygen2_6.0.1        
[58] DBI_0.7                R6_2.2.2               gridExtra_2.3         
[61] knitr_1.17             bit_1.1-12             commonmark_1.4        
[64] Hmisc_4.0-3            rprojroot_1.2          stringi_1.1.6         
[67] Rcpp_0.12.14           geneplotter_1.57.0     rpart_4.1-12          
[70] acepack_1.4.1          coda_0.19-1     
ADD REPLYlink written 5 days ago by Michael Love15k

I started a new thread here to see if S4Vectors authors can helpĀ 

Adding a column to a class that contains DataFrame

ADD REPLYlink written 5 days ago by Michael Love15k

Thanks a lot!

I will wait for their fix.

(BTW: BioConductor recommends that seq_len() or seq_along() be used instead of 1:... :-)

ADD REPLYlink modified 5 days ago • written 5 days ago by matthias.zytnicki0
Please log in to add an answer.

Help
Access

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