Hi,
I'm trying to use DESeq2 to analyse a dataset where I've generated abundances using Kallisto following the vignette "Analyzing RNA-seq data with DESeq2".
I'm getting a consistent error with DESeqDataSetFromTximport:
> dds <- DESeqDataSetFromTximport(txi.kallisto, samples, ~condition) Error in validObject(.Object) : invalid class “SummarizedExperiment” object: 1: invalid object for slot "NAMES" in class "SummarizedExperiment": got class "array", should be or extend class "character_OR_NULL" invalid class “SummarizedExperiment” object: 2: 'names(x)' must be NULL or a character vector with no attributes
The same error occurs if you just take counts:
counts <- as.matrix(txi.kallisto$counts)
and then use DESeqDataSetFromMatrix.
Gone through this systematically and found that there's an issue with the rownames of the counts table within the tximport list, it looks like it is setting them as arrays?
> class(rownames(counts)) [1] "array"
Which then if I set them as a character it seems to accept the matrix (if I round the counts as in the fromTximport function). I can now fix the txi list by doing this:
> rownames(txi.kallisto$counts) <- as.character(rownames(txi.kallisto$counts)) > dds <- DESeqDataSetFromTximport(txi.kallisto, samples, ~condition) using counts and average transcript lengths from tximport
This now appears to work. I think that this must just be a slight bug from one part of the workflow?
Session info below, I updated to the dev version of DESeq2 to see if that fixed it but the same error was in the main release.
> sessionInfo() R version 3.4.0 (2017-04-21) 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=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] DESeq2_1.17.2 SummarizedExperiment_1.6.3 DelayedArray_0.2.7 matrixStats_0.52.2 [5] Biobase_2.36.2 GenomicRanges_1.28.3 GenomeInfoDb_1.12.2 IRanges_2.10.2 [9] S4Vectors_0.14.3 BiocGenerics_0.22.0 tximport_1.4.0 loaded via a namespace (and not attached): [1] genefilter_1.58.1 locfit_1.5-9.1 rhdf5_2.20.0 splines_3.4.0 lattice_0.20-35 [6] colorspace_1.3-2 htmltools_0.3.6 base64enc_0.1-3 survival_2.41-3 XML_3.98-1.7 [11] rlang_0.1.1 DBI_0.6-1 foreign_0.8-68 BiocParallel_1.10.1 RColorBrewer_1.1-2 [16] GenomeInfoDbData_0.99.0 plyr_1.8.4 stringr_1.2.0 zlibbioc_1.22.0 munsell_0.4.3 [21] gtable_0.2.0 htmlwidgets_0.8 memoise_1.1.0 latticeExtra_0.6-28 knitr_1.16 [26] geneplotter_1.54.0 AnnotationDbi_1.38.1 htmlTable_1.9 Rcpp_0.12.11 acepack_1.4.1 [31] xtable_1.8-2 scales_0.4.1 backports_1.1.0 checkmate_1.8.2 Hmisc_4.0-3 [36] annotate_1.54.0 XVector_0.16.0 gridExtra_2.2.1 ggplot2_2.2.1 digest_0.6.12 [41] stringi_1.1.5 grid_3.4.0 tools_3.4.0 bitops_1.0-6 magrittr_1.5 [46] RSQLite_1.1-2 lazyeval_0.2.0 RCurl_1.95-4.8 tibble_1.3.3 Formula_1.2-1 [51] cluster_2.0.6 Matrix_1.2-10 data.table_1.10.4 rpart_4.1-11 nnet_7.3-12 [56] compiler_3.4.0
So the first step would be to downgrade DESeq2, so that biocValid() is happy. Then report back if you still have a problem. Mixing different versions of Bioconductor packages is a recipe for errors. Only using biocLite() for installation is the solution.