Error in SummarizedExperiment(assays = SimpleList(counts = countData)
1
0
Entering edit mode
Hanan • 0
@c51d74dc
Last seen 2.0 years ago
Israel

Hello, I have a fresh install of DESeq2 by running:

install.packages('BiocManager')
BiocManager::install(version = "3.14")
BiocManager::install('DESeq2')

Trying to generate DESeq object:

txi.salmon <- tximport(files, type = "salmon",tx2gene=tx2gene)
sampleTable <- read.csv('sampleTable.csv',head=T,row.names=1,stringsAsFactors = T)
des<-DESeqDataSetFromTximport(txi.salmon,  colData=sampleTable, ~ samp + treatm )

I get:

Error in SummarizedExperiment(assays = SimpleList(counts = countData), : the rownames and colnames of the supplied assay(s) must be NULL or identical to those of the SummarizedExperiment object (or derivative) to construct

Previous installations did not give this error. I guess it is something related to compatible versions of DESeq2 and SummarizedExperiment but as far as I understand they are both the latest versions. Thank you for your help

sessionInfo( )

R version 4.1.2 (2021-11-01) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.6 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] data.table_1.14.2 DESeq2_1.34.0 SummarizedExperiment_1.24.0 Biobase_2.54.0 MatrixGenerics_1.6.0
[6] matrixStats_0.61.0 GenomicRanges_1.46.1 GenomeInfoDb_1.30.1 IRanges_2.28.0 S4Vectors_0.32.3
[11] BiocGenerics_0.40.0 tximport_1.22.0

loaded via a namespace (and not attached): [1] locfit_1.5-9.4 Rcpp_1.0.8 lattice_0.20-45 png_0.1-7 Biostrings_2.62.0 assertthat_0.2.1
[7] utf8_1.2.2 R6_2.5.1 RSQLite_2.2.10 httr_1.4.2 ggplot2_3.3.5 pillar_1.7.0
[13] zlibbioc_1.40.0 rlang_1.0.1 rstudioapi_0.13 annotate_1.72.0 blob_1.2.2 Matrix_1.4-0
[19] splines_4.1.2 BiocParallel_1.28.3 readr_2.1.2 geneplotter_1.72.0 RCurl_1.98-1.6 bit_4.0.4
[25] munsell_0.5.0 DelayedArray_0.20.0 compiler_4.1.2 pkgconfig_2.0.3 tidyselect_1.1.2 KEGGREST_1.34.0
[31] tibble_3.1.6 GenomeInfoDbData_1.2.7 XML_3.99-0.8 fansi_1.0.2 tzdb_0.2.0 crayon_1.5.0
[37] dplyr_1.0.8 bitops_1.0-7 grid_4.1.2 jsonlite_1.7.3 xtable_1.8-4 gtable_0.3.0
[43] lifecycle_1.0.1 DBI_1.1.2 magrittr_2.0.2 scales_1.1.1 vroom_1.5.7 cli_3.2.0
[49] cachem_1.0.6 XVector_0.34.0 genefilter_1.76.0 ellipsis_0.3.2 vctrs_0.3.8 generics_0.1.2
[55] RColorBrewer_1.1-2 tools_4.1.2 bit64_4.0.5 glue_1.6.1 purrr_0.3.4 hms_1.1.1
[61] parallel_4.1.2 fastmap_1.1.0 survival_3.2-13 AnnotationDbi_1.56.2 colorspace_2.0-3 BiocManager_1.30.16
[67] memoise_2.0.1

```

DESeq2 • 8.3k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 10 hours ago
United States

Compare the colnames of txi$counts and the rownames of sampleTable. The software is saying these do not match.

This is an important error to pay attention to: it sometimes indicates the samples are not in order with respect to the metadata and the analysis may be totally wrong.

If however the samples are just labelled differently, I'd suggest to change sampleTable so it's rownames are in accord with colnames of txi$counts.

You can change colnames of txi$counts by adding names(files), see the tximport vignette for an example (the third code chunk has this).

ADD COMMENT
0
Entering edit mode

Thank you, One sample name did not match. It works fine now.

ADD REPLY

Login before adding your answer.

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