Error occurred when convert Seurat v5 object to h5ad file
Closed this issue · 2 comments
maxbond233 commented
When I try to convert Seurat Object to .h5ad file I got an error:
WriteH5AD(seu.filtered, 'data/allcell/allcell_filtered.h5ad')
Error in WriteH5ADHelper(object, assay, h5, global = TRUE) :
no slot of name "meta.features" for this object of class "Assay5"
Here is my environment:
R version 4.3.1 (2023-06-16)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS
Matrix products: default
BLAS/LAPACK: /home/software_install/miniconda3/envs/r_envs/lib/libopenblasp-r0.3.21.so; LAPACK version 3.9.0
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 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Asia/Shanghai
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MuDataSeurat_0.0.0.9000 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.0 dplyr_1.1.3 purrr_1.0.2 readr_2.1.4 tidyr_1.3.0
[9] tibble_3.2.1 ggplot2_3.4.4 tidyverse_2.0.0 scCustomize_1.1.3 Seurat_5.0.0 SeuratObject_5.0.0 sp_2.1-1
loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 rstudioapi_0.15.0 jsonlite_1.8.7 shape_1.4.6 magrittr_2.0.3 spatstat.utils_3.0-4 ggbeeswarm_0.7.2 GlobalOptions_0.1.2 vctrs_0.6.4
[10] ROCR_1.0-11 spatstat.explore_3.2-5 paletteer_1.5.0 janitor_2.2.0 htmltools_0.5.7 sctransform_0.4.1 parallelly_1.36.0 KernSmooth_2.23-22 htmlwidgets_1.6.2
[19] ica_1.0-3 plyr_1.8.9 plotly_4.10.3 zoo_1.8-12 igraph_1.5.1 mime_0.12 lifecycle_1.0.4 pkgconfig_2.0.3 Matrix_1.6-2
[28] R6_2.5.1 fastmap_1.1.1 snakecase_0.11.1 fitdistrplus_1.1-11 future_1.33.0 shiny_1.7.5.1 digest_0.6.33 colorspace_2.1-0 rematch2_2.1.2
[37] patchwork_1.1.3 tensor_1.5 RSpectra_0.16-1 irlba_2.3.5.1 progressr_0.14.0 timechange_0.2.0 fansi_1.0.5 spatstat.sparse_3.0-3 httr_1.4.7
[46] polyclip_1.10-6 abind_1.4-5 compiler_4.3.1 withr_2.5.2 bit64_4.0.5 fastDummies_1.7.3 MASS_7.3-60 tools_4.3.1 vipor_0.4.5
[55] lmtest_0.9-40 beeswarm_0.4.0 httpuv_1.6.11 future.apply_1.11.0 goftest_1.2-3 glue_1.6.2 nlme_3.1-163 promises_1.2.1 grid_4.3.1
[64] Rtsne_0.16 cluster_2.1.4 reshape2_1.4.4 generics_0.1.3 hdf5r_1.3.8 gtable_0.3.4 spatstat.data_3.0-3 tzdb_0.4.0 hms_1.1.3
[73] data.table_1.14.8 utf8_1.2.4 spatstat.geom_3.2-7 RcppAnnoy_0.0.21 ggrepel_0.9.4 RANN_2.6.1 pillar_1.9.0 spam_2.10-0 RcppHNSW_0.5.0
[82] ggprism_1.0.4 later_1.3.1 circlize_0.4.15 splines_4.3.1 lattice_0.22-5 survival_3.5-7 bit_4.0.5 deldir_1.0-9 tidyselect_1.2.0
[91] miniUI_0.1.1.1 pbapply_1.7-2 gridExtra_2.3 scattermore_1.2 matrixStats_1.1.0 stringi_1.8.1 lazyeval_0.2.2 codetools_0.2-19 cli_3.6.1
[100] uwot_0.1.16 xtable_1.8-4 reticulate_1.34.0 munsell_0.5.0 Rcpp_1.0.11 globals_0.16.2 spatstat.random_3.2-1 png_0.1-8 ggrastr_1.0.2
[109] parallel_4.3.1 ellipsis_0.3.2 dotCall64_1.1-0 listenv_0.9.0 viridisLite_0.4.2 scales_1.2.1 ggridges_0.5.4 crayon_1.5.2 leiden_0.4.3
[118] rlang_1.1.2 cowplot_1.1.1
Is this problem caused by Seurat upgrade? How can I convert Seurat v5 object into anndata?
aadimator commented
I'm getting the same error. Were you able to figure out a solution?
maxbond233 commented
I'm getting the same error. Were you able to figure out a solution?
I solved this using the zellkonverter package mentioned in this discussion.