seurat
seurat copied to clipboard
invalid class "Seurat" object: all assays must have a key
I try different way to merge or integrate the multiple multiome (snRNA and snATAC) datasets. But always shows that invalid class "Seurat" object: all assays must have a key. I followed the suggestions to upgrade the package version of Seurat, Signac and SeuratObject, but none work out. Please help. Many thanks!
same problem.dingding
I had a similar problem. I don't have RNA seq data but the ATAC and HTO. After I created a new assay with the HTO data and wanted to normalize it, it reported the error.
bm@assays$HTO <- CreateAssayObject(counts = hto)
bm <- NormalizeData(bm, assay = "HTO", normalization.method = "CLR")
Normalizing across features
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Error in validObject(object = x) :
invalid class "Seurat" object: all assays must have a key
Here is my session info:
R version 4.3.0 (2023-04-21) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux
Matrix products: default BLAS: /usr/lib64/libblas.so.3.4.2 LAPACK: /usr/lib64/liblapack.so.3.4.2
locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=Ctime zone: America/New_York tzcode source: system (glibc)
attached base packages: [1] stats4 stats graphics grDevices utils
[6] datasets methods baseother attached packages: [1] Matrix_1.6-4 patchwork_1.2.0
[3] ggplot2_3.5.0 EnsDb.Mmusculus.v79_2.99.0 [5] ensembldb_2.24.0 AnnotationFilter_1.24.0
[7] GenomicFeatures_1.52.0 AnnotationDbi_1.62.0
[9] Biobase_2.60.0 GenomicRanges_1.52.0
[11] GenomeInfoDb_1.36.0 IRanges_2.34.0
[13] S4Vectors_0.38.2 BiocGenerics_0.46.0
[15] Seurat_5.0.3 SeuratObject_5.0.1
[17] sp_2.1-3 Signac_1.12.9007loaded via a namespace (and not attached): [1] fs_1.6.3 ProtGenerics_1.32.0
[3] matrixStats_1.2.0 spatstat.sparse_3.0-3
[5] bitops_1.0-7 devtools_2.4.5
[7] httr_1.4.7 RColorBrewer_1.1-3
[9] profvis_0.3.7 tools_4.3.0
[11] sctransform_0.4.1 backports_1.4.1
[13] utf8_1.2.4 R6_2.5.1
[15] lazyeval_0.2.2 uwot_0.1.16
[17] urlchecker_1.0.1 withr_3.0.0
[19] prettyunits_1.1.1 gridExtra_2.3
[21] progressr_0.14.0 cli_3.6.2
[23] textshaping_0.3.6 spatstat.explore_3.2-7
[25] fastDummies_1.7.3 labeling_0.4.3
[27] spatstat.data_3.0-4 ggridges_0.5.6
[29] pbapply_1.7-2 Rsamtools_2.16.0
[31] systemfonts_1.0.4 foreign_0.8-84
[33] dichromat_2.0-0.1 sessioninfo_1.2.2
[35] parallelly_1.37.1 BSgenome_1.68.0
[37] rstudioapi_0.14 RSQLite_2.3.1
[39] generics_0.1.3 BiocIO_1.10.0
[41] ica_1.0-3 spatstat.random_3.2-3
[43] dplyr_1.1.4 fansi_1.0.6
[45] abind_1.4-5 lifecycle_1.0.4
[47] yaml_2.3.8 SummarizedExperiment_1.30.1 [49] BiocFileCache_2.8.0 Rtsne_0.17
[51] grid_4.3.0 blob_1.2.4
[53] promises_1.2.1 crayon_1.5.2
[55] miniUI_0.1.1.1 lattice_0.21-8
[57] cowplot_1.1.3 KEGGREST_1.40.0
[59] pillar_1.9.0 knitr_1.45
[61] rjson_0.2.21 future.apply_1.11.2
[63] codetools_0.2-19 fastmatch_1.1-4
[65] leiden_0.4.3.1 glue_1.7.0
[67] remotes_2.4.2 data.table_1.15.2
[69] vctrs_0.6.5 png_0.1-8
[71] spam_2.10-0 gtable_0.3.4
[73] cachem_1.0.8 xfun_0.43
[75] S4Arrays_1.0.6 mime_0.12
[77] survival_3.5-5 RcppRoll_0.3.0
[79] ellipsis_0.3.2 fitdistrplus_1.1-11
[81] ROCR_1.0-11 nlme_3.1-162
[83] usethis_2.1.6 bit64_4.0.5
[85] progress_1.2.2 filelock_1.0.2
[87] RcppAnnoy_0.0.22 irlba_2.3.5.1
[89] KernSmooth_2.23-20 rpart_4.1.19
[91] colorspace_2.1-0 DBI_1.1.3
[93] Hmisc_5.0-1 nnet_7.3-18
[95] tidyselect_1.2.1 processx_3.8.4
[97] bit_4.0.5 compiler_4.3.0
[99] curl_5.0.0 htmlTable_2.4.1
[101] hdf5r_1.3.8 xml2_1.3.4
[103] DelayedArray_0.26.2 plotly_4.10.4
[105] rtracklayer_1.60.0 checkmate_2.2.0
[107] scales_1.3.0 lmtest_0.9-40
[109] callr_3.7.3 rappdirs_0.3.3
[111] stringr_1.5.1 digest_0.6.35
[113] goftest_1.2-3 spatstat.utils_3.0-4
[115] rmarkdown_2.26 XVector_0.40.0
[117] htmltools_0.5.8 pkgconfig_2.0.3
[119] base64enc_0.1-3 MatrixGenerics_1.12.0
[121] dbplyr_2.3.2 fastmap_1.1.1
[123] rlang_1.1.3 htmlwidgets_1.6.4
[125] shiny_1.8.1 farver_2.1.1
[127] zoo_1.8-12 jsonlite_1.8.8
[129] BiocParallel_1.34.0 VariantAnnotation_1.46.0
[131] RCurl_1.98-1.12 magrittr_2.0.3
[133] Formula_1.2-5 GenomeInfoDbData_1.2.10
[135] dotCall64_1.1-1 munsell_0.5.0
[137] Rcpp_1.0.12 reticulate_1.35.0
[139] stringi_1.8.3 zlibbioc_1.46.0
[141] MASS_7.3-59 plyr_1.8.9
[143] pkgbuild_1.4.0 parallel_4.3.0
[145] listenv_0.9.1 ggrepel_0.9.5
[147] deldir_2.0-4 Biostrings_2.68.0
[149] splines_4.3.0 tensor_1.5
[151] hms_1.1.3 ps_1.7.5
[153] igraph_2.0.3 spatstat.geom_3.2-9
[155] RcppHNSW_0.6.0 pkgload_1.3.4
[157] reshape2_1.4.4 biomaRt_2.56.0
[159] XML_3.99-0.14 evaluate_0.23
[161] biovizBase_1.48.0 httpuv_1.6.15
[163] RANN_2.6.1 tidyr_1.3.1
[165] purrr_1.0.2 polyclip_1.10-6
[167] future_1.33.2 scattermore_1.2
[169] xtable_1.8-4 restfulr_0.0.15
[171] RSpectra_0.16-1 later_1.3.2
[173] viridisLite_0.4.2 ragg_1.2.5
[175] tibble_3.2.1 memoise_2.0.1
[177] GenomicAlignments_1.36.0 cluster_2.1.4
[179] globals_0.16.3
You need to set the new assay with:
bm[["HTO"]] <- CreateAssayObject(counts = hto)