DESeq2 class error: superclass "ExpData" not defined in the environment of the object's class
1
4
Entering edit mode
Cassia ▴ 40
@6102dba4
Last seen 2 days ago
United States

Hi, I'm working with R 4.5.0, Bioconductor version 3.21, and DESeq2 1.48.0, and I'm getting the following error:

dds <- DESeqDataSetFromMatrix(
  countData = counts,
  colData = colData,
  design = ~ subjectID + condition  # Paired design
)
# converting counts to integer mode
# Error in validObject(.Object) : 
#   invalid class "DESeqDataSet" object: superclass "ExpData" not defined in the environment of the object's class

I've tried manually reinstalling DESeq2 and its dependencies, Bioconductor, and I even went so far as to do a fresh R install in a new environment, but I'm still getting this bug. Can anybody help? Thanks so much!

Session info:

R version 4.5.0 (2025-04-11) Platform: aarch64-apple-darwin20 Running under: macOS Sonoma 14.6.1

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1

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

time zone: America/Los_Angeles tzcode source: internal

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

other attached packages: [1] DESeq2_1.48.0 SummarizedExperiment_1.38.1 Biobase_2.68.0
[4] MatrixGenerics_1.20.0 matrixStats_1.5.0 GenomicRanges_1.60.0
[7] GenomeInfoDb_1.44.0 IRanges_2.42.0 S4Vectors_0.46.0
[10] BiocGenerics_0.54.0 generics_0.1.3

loaded via a namespace (and not attached): [1] Matrix_1.7-3 gtable_0.3.6 jsonlite_2.0.0
[4] dplyr_1.1.4 compiler_4.5.0 crayon_1.5.3
[7] tidyselect_1.2.1 Rcpp_1.0.14 parallel_4.5.0
[10] scales_1.4.0 BiocParallel_1.42.0 lattice_0.22-7
[13] ggplot2_3.5.2 R6_2.6.1 XVector_0.48.0
[16] S4Arrays_1.8.0 tibble_3.2.1 DelayedArray_0.34.1
[19] GenomeInfoDbData_1.2.14 pillar_1.10.2 RColorBrewer_1.1-3
[22] rlang_1.1.6 SparseArray_1.8.0 cli_3.6.5
[25] magrittr_2.0.3 locfit_1.5-9.12 grid_4.5.0
[28] lifecycle_1.0.4 vctrs_0.6.5 glue_1.8.0
[31] farver_2.1.2 codetools_0.2-20 abind_1.4-8
[34] httr_1.4.7 pkgconfig_2.0.3 tools_4.5.0
[37] UCSC.utils_1.4.0

DESeq2 • 2.5k views
ADD COMMENT
1
Entering edit mode

I just ran into the same issue. I also tried fresh install and I reran code from the DESeq2 vignette (Transcript abundance files and tximport / tximeta) and it got the same error.

R version 4.5.0 (2025-04-11) Platform: aarch64-apple-darwin20 Running under: macOS Sonoma 14.4.1

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1

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

time zone: America/New_York tzcode source: internal

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

other attached packages: [1] readr_2.1.5 limma_3.64.0
[3] goseq_1.60.0 geneLenDataBase_1.44.0
[5] BiasedUrn_2.0.12 TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
[7] org.Mm.eg.db_3.21.0 tximport_1.36.0
[9] GenomicAlignments_1.44.0 Rsamtools_2.24.0
[11] Biostrings_2.76.0 XVector_0.48.0
[13] TxDb.Mmusculus.UCSC.mm10.knownGene_3.10.0 GenomicFeatures_1.60.0
[15] AnnotationDbi_1.70.0 DESeq2_1.48.0
[17] SummarizedExperiment_1.38.1 Biobase_2.68.0
[19] MatrixGenerics_1.20.0 matrixStats_1.5.0
[21] GenomicRanges_1.60.0 GenomeInfoDb_1.44.0
[23] IRanges_2.42.0 S4Vectors_0.46.0
[25] BiocGenerics_0.54.0 generics_0.1.3

loaded via a namespace (and not attached): [1] DBI_1.2.3 bitops_1.0-9 httr2_1.1.2
[4] biomaRt_2.64.0 rlang_1.1.6 magrittr_2.0.3
[7] compiler_4.5.0 RSQLite_2.3.11 mgcv_1.9-3
[10] png_0.1-8 vctrs_0.6.5 txdbmaker_1.4.1
[13] stringr_1.5.1 pkgconfig_2.0.3 crayon_1.5.3
[16] fastmap_1.2.0 dbplyr_2.5.0 rmarkdown_2.29
[19] tzdb_0.5.0 UCSC.utils_1.4.0 bit_4.6.0
[22] xfun_0.52 cachem_1.1.0 jsonlite_2.0.0
[25] progress_1.2.3 blob_1.2.4 DelayedArray_0.34.1
[28] BiocParallel_1.42.0 parallel_4.5.0 prettyunits_1.2.0
[31] R6_2.6.1 stringi_1.8.7 RColorBrewer_1.1-3
[34] rtracklayer_1.68.0 Rcpp_1.0.14 knitr_1.50
[37] Matrix_1.7-3 splines_4.5.0 tidyselect_1.2.1
[40] abind_1.4-8 yaml_2.3.10 codetools_0.2-20
[43] curl_6.2.2 lattice_0.22-7 tibble_3.2.1
[46] withr_3.0.2 KEGGREST_1.48.0 evaluate_1.0.3
[49] BiocFileCache_2.16.0 xml2_1.3.8 pillar_1.10.2
[52] BiocManager_1.30.25 filelock_1.0.3 vroom_1.6.5
[55] RCurl_1.98-1.17 hms_1.1.3 ggplot2_3.5.2
[58] scales_1.4.0 glue_1.8.0 tools_4.5.0
[61] BiocIO_1.18.0 locfit_1.5-9.12 XML_3.99-0.18
[64] grid_4.5.0 colorspace_2.1-1 nlme_3.1-168
[67] GenomeInfoDbData_1.2.14 restfulr_0.0.15 cli_3.6.5
[70] rappdirs_0.3.3 S4Arrays_1.8.0 dplyr_1.1.4
[73] gtable_0.3.6 digest_0.6.37 SparseArray_1.8.0
[76] rjson_0.2.23 farver_2.1.2 memoise_2.0.1
[79] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7
[82] statmod_1.5.0 GO.db_3.21.0 bit64_4.6.0-1

ADD REPLY
0
Entering edit mode

Posted also here

https://github.com/thelovelab/DESeq2/issues/112

I have bumped the version number in release which should resolve the issue once it propagates.

ADD REPLY
3
Entering edit mode
Ryan ▴ 30
@ad67e9f0
Last seen 10 days ago
United States

Yes I have seen this as well with some student code.

You will need to either to install SummarizedExperiment from the Bioconductor development version (3.22), or you will need to include this code

setClassUnion("ExpData", c("matrix", "SummarizedExperiment"))

before running the DESeqDataSetFromMatrix function from DESeq2.

(Both of these fixes seem to "fix" the issue.)

If you look at the commit history for the SummarizedExperiment git repository, you will see the bug was introduced commit 449ce75159432604a61d6fc8f129833d1b637416, which appears to be present in Bioconductor 3.21, and fixed in commit 494ca9fc060b433bed2dca9b12ca8d7be4375140, which appears to be present in the Bioconductor dev version 3.22.

ADD COMMENT

Login before adding your answer.

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