mojaveazure / seurat-disk

Interfaces for HDF5-based Single Cell File Formats
https://mojaveazure.github.io/seurat-disk
GNU General Public License v3.0
151 stars 48 forks source link

Error when saving H5Seurat #15

Open dylanmr opened 4 years ago

dylanmr commented 4 years ago

Thanks for this great tool. I was attempting to save a large dataset and came across an error right at the end of saving

` Creating h5Seurat file for version 3.1.5.9900 Adding counts for RNA Adding data for RNA No variable features found for RNA No feature-level metadata found for RNA Adding counts for hto Adding data for hto No variable features found for hto No feature-level metadata found for hto Adding counts for spliced Adding data for spliced No variable features found for spliced No feature-level metadata found for spliced Adding counts for unspliced Adding data for unspliced No variable features found for unspliced No feature-level metadata found for unspliced Adding counts for SCT Adding data for SCT Adding scale.data for SCT Adding variable features for SCT Adding feature-level metadata for SCT

Error in xgroup$create_attr(attr_name = "names", robj = intersect(x = names(x = x), : HDF5-API Errors: error #000: /home/hdftest/snapshots-hdf5_1_10_5/current/src/H5A.c in H5Acreate2(): line 279: unable to create attribute class: HDF5 major: Attribute minor: Unable to initialize object

error #001: /home/hdftest/snapshots-hdf5_1_10_5/current/src/H5Aint.c in H5A__create(): line 275: unable to create attribute in object header
    class: HDF5
    major: Attribute
    minor: Unable to insert object

error #002: /home/hdftest/snapshots-hdf5_1_10_5/current/src/H5Oattribute.c in H5O__attr_create(): line 335: unable to create new attribute in header
    class: HDF5
    major: Attribute
    minor: Unable to insert object

error #003: /home/hdftest/snapshots-hdf5_1_10_5/current/src/H5Omessage.c in H5O__msg_append_real(): line 222: unable to create new message
    class: HDF5
    major: Object header
    minor: No space available for allocation

error #004: /home/hdftest/snapshots-hdf5_1_10_

`

Do you have any suggestions on dealing with this?

my session info is below

` R version 4.0.2 (2020-06-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Storage

Matrix products: default BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so

locale: [1] LC_CTYPE=en_DK.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_DK.UTF-8 LC_COLLATE=en_DK.UTF-8 [5] LC_MONETARY=en_DK.UTF-8 LC_MESSAGES=en_DK.UTF-8 [7] LC_PAPER=en_DK.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_DK.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] SeuratDisk_0.0.0.9010 Seurat_3.2.0

loaded via a namespace (and not attached): [1] nlme_3.1-148 bit64_0.9-7.1 filelock_1.0.2 [4] RcppAnnoy_0.0.16 RColorBrewer_1.1-2 progress_1.2.2 [7] httr_1.4.2 sctransform_0.2.1 tools_4.0.2 [10] backports_1.1.8 R6_2.4.1 irlba_2.3.3 [13] rpart_4.1-15 KernSmooth_2.23-17 uwot_0.1.8 [16] mgcv_1.8-31 lazyeval_0.2.2 colorspace_1.4-1 [19] withr_2.2.0 gridExtra_2.3 tidyselect_1.1.0 [22] prettyunits_1.1.1 bit_1.1-15.2 compiler_4.0.2 [25] cli_2.0.2 hdf5r_1.3.2 plotly_4.9.2.1 [28] stringfish_0.13.3 scales_1.1.1 spatstat.data_1.4-3 [31] lmtest_0.9-37 ggridges_0.5.2 pbapply_1.4-2 [34] goftest_1.2-2 spatstat_1.64-1 stringr_1.4.0 [37] digest_0.6.25 spatstat.utils_1.17-0 txtq_0.2.3 [40] pkgconfig_2.0.3 htmltools_0.5.0 fastmap_1.0.1 [43] htmlwidgets_1.5.1 rlang_0.4.7 shiny_1.5.0 [46] generics_0.0.2 RApiSerialize_0.1.0 zoo_1.8-8 [49] drake_7.12.4 jsonlite_1.7.0 ica_1.0-2 [52] dplyr_1.0.0 magrittr_1.5 patchwork_1.0.1 [55] Matrix_1.2-18 Rcpp_1.0.5 munsell_0.5.0 [58] fansi_0.4.1 abind_1.4-5 ape_5.4 [61] reticulate_1.16 lifecycle_0.2.0 stringi_1.4.6 [64] MASS_7.3-51.6 storr_1.2.1 Rtsne_0.15 [67] plyr_1.8.6 grid_4.0.2 parallel_4.0.2 [70] listenv_0.8.0 promises_1.1.1 ggrepel_0.8.2 [73] crayon_1.3.4 deldir_0.1-28 miniUI_0.1.1.1 [76] lattice_0.20-41 cowplot_1.0.0 splines_4.0.2 [79] tensor_1.5 hms_0.5.3 pillar_1.4.6 [82] igraph_1.2.5 base64url_1.4 future.apply_1.6.0 [85] reshape2_1.4.4 codetools_0.2-16 leiden_0.3.3 [88] glue_1.4.1 data.table_1.13.0 vctrs_0.3.2 [91] png_0.1-7 httpuv_1.5.4 polyclip_1.10-0 [94] gtable_0.3.0 RANN_2.6.1 purrr_0.3.4 [97] tidyr_1.1.0 qs_0.23.2 future_1.18.0 [100] assertthat_0.2.1 ggplot2_3.3.2 rsvd_1.0.3 [103] mime_0.9 xtable_1.8-4 later_1.1.0.1 [106] survival_3.1-12 viridisLite_0.3.0 tibble_3.0.3 [109] cluster_2.1.0 globals_0.12.5 fitdistrplus_1.1-1 [112] ellipsis_0.3.1 ROCR_1.0-11 `

dylanmr commented 4 years ago

I was able to semi-fix this by removing any columns with NA from the metadata but now receive this error.

Error in attr$write(robj) : HDF5-API Errors: error #000: /home/hdftest/snapshots-hdf5_1_10_5/current/src/H5A.c in H5Awrite(): line 619: null attribute buffer class: HDF5 major: Invalid arguments to routine minor: Bad value

vincent-marty commented 3 years ago

I have the same issue while trying to save H5Seurat after using the FindVariableFeatures function (method "mvp") with data from https://broadinstitute.github.io/wot/tutorial/ (after converting h5ad fil to seurat file).

var2 <- FindVariableFeatures(df, selection.method = "mvp", num.bin = 20) Calculating gene means 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| Calculating gene variance to mean ratios 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| SaveH5Seurat(var2, overwrite = TRUE) Creating h5Seurat file for version 3.1.5.9900 Adding counts for RNA Adding data for RNA Adding variable features for RNA Adding feature-level metadata for RNA Error in attr$write(robj) : HDF5-API Errors: error #000: ../../../src/H5A.c in H5Awrite(): line 638: null attribute buffer class: HDF5 major: Invalid arguments to routine minor: Bad value

Would you have any clue how to solve this ? (When I use SaveH5Seurat before FindVariableFeatures all is working well)

Thank you in advance

ShaowenJ commented 3 years ago

Same error here....

Creating h5Seurat file for version 3.1.5.9900 Adding counts for RNA Adding data for RNA No variable features found for RNA No feature-level metadata found for RNA Adding cell embeddings for umap No loadings for umap No projected loadings for umap Error in attr$write(robj) : HDF5-API Errors: error #000: ../../../src/H5A.c in H5Awrite(): line 638: null attribute buffer class: HDF5 major: Invalid arguments to routine minor: Bad value

lavon79 commented 3 years ago

Same error here....

Creating h5Seurat file for version 3.1.5.9900 Adding counts for RNA Adding data for RNA No variable features found for RNA No feature-level metadata found for RNA Adding cell embeddings for umap No loadings for umap No projected loadings for umap Error in attr$write(robj) : HDF5-API Errors: error #0: ../../../src/H5A.c in H5Awrite(): line 638: null attribute buffer class: HDF5 major: Invalid arguments to routine minor: Bad value

I faced the same error too. have you sloved it?

ShaowenJ commented 3 years ago

@lavon79 I have not....

yueqiw commented 3 years ago

Same error:

Creating h5Seurat file for version 3.1.5.9900

Adding counts for RNA

Adding data for RNA

Adding scale.data for RNA

Adding variable features for RNA

No feature-level metadata found for RNA

Adding cell embeddings for pca

No loadings for pca

No projected loadings for pca

Error in attr$write(robj): HDF5-API Errors:
    error #000: H5A.c in H5Awrite(): line 619: null attribute buffer
        class: HDF5
        major: Invalid arguments to routine
        minor: Bad value

Traceback:

1. SaveH5Seurat(seurat3_data, filename = h5seurat_fname)
2. SaveH5Seurat.Seurat(seurat3_data, filename = h5seurat_fname)
3. as.h5Seurat(x = object, filename = filename, overwrite = overwrite, 
 .     verbose = verbose, ...)
4. as.h5Seurat.Seurat(x = object, filename = filename, overwrite = overwrite, 
 .     verbose = verbose, ...)
5. WriteH5Group(x = x[[reduc]], name = reduc, hgroup = hfile[["reductions"]], 
 .     verbose = verbose)
6. WriteH5Group(x = x[[reduc]], name = reduc, hgroup = hfile[["reductions"]], 
 .     verbose = verbose)
7. xgroup$create_attr(attr_name = "global", robj = BoolToInt(x = IsGlobal(object = x)), 
 .     dtype = GuessDType(x = IsGlobal(object = x)))
8. attr$write(robj)
AAA-3 commented 3 years ago

Same here. My Seurata Object was an older version which I updated.

Creating h5Seurat file for version 3.1.5.9900
Adding counts for RNA
Adding data for RNA
Adding scale.data for RNA
Adding variable features for RNA
No feature-level metadata found for RNA
Adding cell embeddings for pca
Adding loadings for pca
No projected loadings for pca
Error in attr$write(robj) : HDF5-API Errors:
    error #000: ../../../src/H5A.c in H5Awrite(): line 638: null attribute buffer
        class: HDF5
        major: Invalid arguments to routine
        minor: Bad value
huawen-poppy commented 2 years ago

I faced the same issue here. To solve this problem, I firstly updated my old seurat object which contains PCA, UMAP, and TSNE embeddings. Then I reran the RunPCA, RunUMAP, and RunTSNE functions on my updated object. After this, I can successfully convert the object to h5ad format. Hope this information helps.

YY-SONG0718 commented 2 years ago

I faced the same issue here. To solve this problem, I firstly updated my old seurat object which contains PCA, UMAP, and TSNE embeddings. Then I reran the RunPCA, RunUMAP, and RunTSNE functions on my updated object. After this, I can successfully convert the object to h5ad format. Hope this information helps.

I just had the same issue and this solution worked.

volkansevim commented 2 years ago

I encountered a different error saving a Seurat H5:

Creating h5Seurat file for version 3.1.5.9900

Adding counts for RNA

Adding data for RNA

No variable features found for RNA

No feature-level metadata found for RNA

Adding counts for ATAC

Adding data for ATAC

Adding variable features for ATAC

Adding feature-level metadata for ATAC

Writing out ranges for ATAC

Writing out motifs for ATAC

Error in attr$write(robj): HDF5-API Errors:
    error #000: H5A.c in H5Awrite(): line 657: buf parameter can't be NULL
        class: HDF5
        major: Invalid arguments to routine
        minor: Bad value

Traceback:

1. SaveH5Seurat(seurat, save_h5_file, overwrite = TRUE, verbose = TRUE)
2. SaveH5Seurat.Seurat(seurat, save_h5_file, overwrite = TRUE, verbose = TRUE)
3. as.h5Seurat(x = object, filename = filename, overwrite = overwrite, 
 .     verbose = verbose, ...)
4. as.h5Seurat.Seurat(x = object, filename = filename, overwrite = overwrite, 
 .     verbose = verbose, ...)
5. WriteH5Group(x = x[[assay]], name = assay, hgroup = hfile[["assays"]], 
 .     verbose = verbose)
6. WriteH5Group(x = x[[assay]], name = assay, hgroup = hfile[["assays"]], 
 .     verbose = verbose)
7. WriteH5Group(x = slot(object = x, name = slot), name = slot, 
 .     hgroup = xgroup, verbose = verbose)
8. WriteH5Group(x = slot(object = x, name = slot), name = slot, 
 .     hgroup = xgroup, verbose = verbose)
9. WriteH5Group(x = slot(object = x, name = i), name = i, hgroup = xgroup, 
 .     verbose = verbose)
10. WriteH5Group(x = slot(object = x, name = i), name = i, hgroup = xgroup, 
  .     verbose = verbose)
11. xgroup$create_attr(attr_name = "colnames", robj = intersect(x = colnames(x = x), 
  .     y = names(x = xgroup)), dtype = GuessDType(x = colnames(x = x)))
12. attr$write(robj)

This problem occurs after adding a motifs assay to the Seurat object:

DefaultAssay(seurat) <- "ATAC"
pwm_set <- getMatrixSet(x = JASPAR2020, opts = list(species = 9606, all_versions = FALSE))
motif.matrix <- CreateMotifMatrix(features = granges(seurat), pwm = pwm_set, genome = 'hg38', use.counts = FALSE)
motif.object <- CreateMotifObject(data = motif.matrix, pwm =   pwm_set)
seurat <- SetAssayData(seurat, assay = 'ATAC', slot = 'motifs', new.data = motif.object)

I was able to save the file without an error before this step.

54 and #121 also encountered a similar problem.

Session info:

R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS/LAPACK: /home/vsevim/software/anaconda3/envs/Renv/lib/libopenblasp-r0.3.20.so

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=C       

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg38_1.4.4 BSgenome_1.62.0                  
 [3] rtracklayer_1.54.0                Biostrings_2.62.0                
 [5] XVector_0.34.0                    motifmatchr_1.16.0               
 [7] TFBSTools_1.32.0                  JASPAR2020_0.99.10               
 [9] chromVAR_1.16.0                   SeuratDisk_0.0.0.9020            
[11] bedr_1.0.7                        ggplot2_3.3.6                    
[13] dplyr_1.0.9                       EnsDb.Hsapiens.v86_2.99.0        
[15] ensembldb_2.18.4                  AnnotationFilter_1.18.0          
[17] GenomicFeatures_1.46.5            AnnotationDbi_1.56.2             
[19] Biobase_2.54.0                    GenomicRanges_1.46.1             
[21] GenomeInfoDb_1.30.1               IRanges_2.28.0                   
[23] S4Vectors_0.32.4                  BiocGenerics_0.40.0              
[25] Signac_1.7.0                      sp_1.5-0                         
[27] SeuratObject_4.1.0                Seurat_4.1.1                     

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3              pbdZMQ_0.3-7               
  [3] scattermore_0.8             R.methodsS3_1.8.2          
  [5] nabor_0.5.0                 tidyr_1.2.0                
  [7] bit64_4.0.5                 knitr_1.39                 
  [9] irlba_2.3.5                 DelayedArray_0.20.0        
 [11] R.utils_2.12.0              data.table_1.14.2          
 [13] rpart_4.1.16                KEGGREST_1.34.0            
 [15] RCurl_1.98-1.8              generics_0.1.3             
 [17] cowplot_1.1.1               lambda.r_1.2.4             
 [19] RSQLite_2.2.15              RANN_2.6.1                 
 [21] future_1.27.0               tzdb_0.3.0                 
 [23] bit_4.0.4                   spatstat.data_2.2-0        
 [25] xml2_1.3.3                  httpuv_1.6.5               
 [27] SummarizedExperiment_1.24.0 assertthat_0.2.1           
 [29] DirichletMultinomial_1.36.0 xfun_0.32                  
 [31] hms_1.1.1                   evaluate_0.16              
 [33] promises_1.2.0.1            fansi_1.0.3                
 [35] restfulr_0.0.15             progress_1.2.2             
 [37] caTools_1.18.2              dbplyr_2.2.1               
 [39] igraph_1.3.4                DBI_1.1.3                  
 [41] htmlwidgets_1.5.4           futile.logger_1.4.3        
 [43] spatstat.geom_2.4-0         purrr_0.3.4                
 [45] ellipsis_0.3.2              RSpectra_0.16-1            
 [47] backports_1.4.1             annotate_1.72.0            
 [49] biomaRt_2.50.3              deldir_1.0-6               
 [51] MatrixGenerics_1.6.0        vctrs_0.4.1                
 [53] Cairo_1.6-0                 ROCR_1.0-11                
 [55] abind_1.4-5                 cachem_1.0.6               
 [57] withr_2.5.0                 progressr_0.10.1           
 [59] checkmate_2.1.0             sctransform_0.3.3          
 [61] GenomicAlignments_1.30.0    prettyunits_1.1.1          
 [63] goftest_1.2-3               cluster_2.1.3              
 [65] seqLogo_1.60.0              IRdisplay_1.1              
 [67] lazyeval_0.2.2              crayon_1.5.1               
 [69] hdf5r_1.3.5                 pkgconfig_2.0.3            
 [71] labeling_0.4.2              vipor_0.4.5                
 [73] nlme_3.1-159                ProtGenerics_1.26.0        
 [75] nnet_7.3-17                 rlang_1.0.6                
 [77] globals_0.16.0              lifecycle_1.0.2            
 [79] miniUI_0.1.1.1              filelock_1.0.2             
 [81] BiocFileCache_2.2.1         dichromat_2.0-0.1          
 [83] VennDiagram_1.7.3           ggrastr_1.0.1              
 [85] polyclip_1.10-0             matrixStats_0.62.0         
 [87] lmtest_0.9-40               Matrix_1.4-1               
 [89] IRkernel_1.3                zoo_1.8-10                 
 [91] beeswarm_0.4.0              base64enc_0.1-3            
 [93] ggridges_0.5.3              png_0.1-7                  
 [95] viridisLite_0.4.1           rjson_0.2.21               
 [97] bitops_1.0-7                R.oo_1.25.0                
 [99] KernSmooth_2.23-20          blob_1.2.3                 
[101] stringr_1.4.0               parallelly_1.32.1          
[103] spatstat.random_2.2-0       readr_2.1.2                
[105] jpeg_0.1-9                  CNEr_1.30.0                
[107] scales_1.2.1                memoise_2.0.1              
[109] magrittr_2.0.3              plyr_1.8.7                 
[111] ica_1.0-3                   zlibbioc_1.40.0            
[113] compiler_4.1.3              BiocIO_1.4.0               
[115] RColorBrewer_1.1-3          fitdistrplus_1.1-8         
[117] Rsamtools_2.10.0            cli_3.4.1                  
[119] listenv_0.8.0               patchwork_1.1.1            
[121] pbapply_1.5-0               htmlTable_2.4.1            
[123] formatR_1.12                Formula_1.2-4              
[125] MASS_7.3-58.1               mgcv_1.8-40                
[127] tidyselect_1.1.2            stringi_1.7.8              
[129] yaml_2.3.5                  latticeExtra_0.6-30        
[131] ggrepel_0.9.1               grid_4.1.3                 
[133] VariantAnnotation_1.40.0    fastmatch_1.1-3            
[135] tools_4.1.3                 future.apply_1.9.0         
[137] parallel_4.1.3              rstudioapi_0.13            
[139] uuid_1.1-0                  TFMPvalue_0.0.8            
[141] foreign_0.8-82              gridExtra_2.3              
[143] farver_2.1.1                Rtsne_0.16                 
[145] digest_0.6.29               rgeos_0.5-9                
[147] pracma_2.3.8                shiny_1.7.2                
[149] Rcpp_1.0.9                  later_1.3.0                
[151] RcppAnnoy_0.0.19            httr_1.4.4                 
[153] biovizBase_1.42.0           colorspace_2.0-3           
[155] brio_1.1.3                  XML_3.99-0.10              
[157] tensor_1.5                  reticulate_1.25-9000       
[159] splines_4.1.3               uwot_0.1.11                
[161] RcppRoll_0.3.0              spatstat.utils_2.3-1       
[163] plotly_4.10.0               xtable_1.8-4               
[165] poweRlaw_0.70.6             jsonlite_1.8.0             
[167] futile.options_1.0.1        testthat_3.1.4             
[169] R6_2.5.1                    Hmisc_4.7-0                
[171] pillar_1.8.1                htmltools_0.5.3            
[173] mime_0.12                   DT_0.24                    
[175] glue_1.6.2                  fastmap_1.1.0              
[177] BiocParallel_1.28.3         codetools_0.2-18           
[179] utf8_1.2.2                  lattice_0.20-45            
[181] spatstat.sparse_2.1-1       tibble_3.1.8               
[183] curl_4.3.2                  ggbeeswarm_0.6.0           
[185] leiden_0.4.2                gtools_3.9.3               
[187] GO.db_3.14.0                interp_1.1-3               
[189] survival_3.4-0              repr_1.1.4                 
[191] munsell_0.5.0               GenomeInfoDbData_1.2.7     
[193] reshape2_1.4.4              gtable_0.3.1               
[195] spatstat.core_2.4-4        
ShanshanHe-44 commented 1 year ago

I tried the solution in #26 and it succeed. I think that could be the problem in 'reductions'. srt@reductions$umap@misc <- list()

laurabchopp commented 1 year ago

I encountered a similar problem after adding motif object to my peaks assay. Solved it with this line:

SeuratObject@assays$peaks@motifs <- NULL

ShanshanHe-44 commented 1 year ago

Once I update my Seurat to latest version, I got this error again. And I try to empty all my reductions layers but still useless. Error in if (ncol(x = x[[]])) { : argument is of length zero

pravinavenk commented 1 year ago

Even I got this error Once I update my Seurat to latest version. Could someone help with this ?

Error in if (ncol(x = x[[]])) { : argument is of length zero

liuxiawei commented 5 months ago

Same problem. Data from GSE152766 , GSE152766_Root_Atlas.rds.gz ERROR:

Warning message:
“Overwriting previous file RNA.h5Seurat”
Creating h5Seurat file for version 3.1.5.9900

Adding counts for RNA

Adding data for RNA

No variable features found for RNA

No feature-level metadata found for RNA

Adding counts for SCT

Adding data for SCT

Adding scale.data for SCT

Adding variable features for SCT

Adding feature-level metadata for SCT

Adding data for integrated

Adding scale.data for integrated

Adding variable features for integrated

No feature-level metadata found for integrated

Adding cell embeddings for pca

Adding loadings for pca

No projected loadings for pca

Adding standard deviations for pca

No JackStraw data for pca

Adding cell embeddings for umap

No loadings for umap

No projected loadings for umap

No standard deviations for umap

No JackStraw data for umap

Adding cell embeddings for umap_3D

No loadings for umap_3D

No projected loadings for umap_3D

No standard deviations for umap_3D

No JackStraw data for umap_3D

Adding cell embeddings for umap_2D

No loadings for umap_2D

No projected loadings for umap_2D

No standard deviations for umap_2D

No JackStraw data for umap_2D

Adding cell embeddings for umap_50

No loadings for umap_50

No projected loadings for umap_50

No standard deviations for umap_50

No JackStraw data for umap_50

Error in xgroup$create_attr(attr_name = "names", robj = intersect(x = names(x = x), : HDF5-API Errors:
    error #000: H5A.c in H5Acreate2(): line 298: unable to create attribute
        class: HDF5
        major: Attribute
        minor: Unable to initialize object

    error #001: H5VLcallback.c in H5VL_attr_create(): line 988: attribute create failed
        class: HDF5
        major: Virtual Object Layer
        minor: Unable to create file

    error #002: H5VLcallback.c in H5VL__attr_create(): line 955: attribute create failed
        class: HDF5
        major: Virtual Object Layer
        minor: Unable to create file

    error #003: H5VLnative_attr.c in H5VL__native_attr_create(): line 75: unable to create attribute
        class: HDF5
        major: Attribute
        minor: Unable to initialize object

    error #004: H5Aint.c in H5A__create(): line 268: unable to create attribute in object header
        class: HDF5
        major: Attribute
        minor: Unable to insert object

    error #005: H5Oattribute.c in H5O__attr_create(): line 317: unable to create
Traceback:

1. SaveH5Seurat(tmp, filename = "RNA.h5Seurat", overwrite = T)
2. SaveH5Seurat.Seurat(tmp, filename = "RNA.h5Seurat", overwrite = T)
3. as.h5Seurat(x = object, filename = filename, overwrite = overwrite, 
 .     verbose = verbose, ...)
4. as.h5Seurat.Seurat(x = object, filename = filename, overwrite = overwrite, 
 .     verbose = verbose, ...)
5. WriteH5Group(x = x[[]], name = "meta.data", hgroup = hfile, verbose = verbose)
6. WriteH5Group(x = x[[]], name = "meta.data", hgroup = hfile, verbose = verbose)
7. WriteH5Group(x = x[, i, drop = TRUE], name = i, hgroup = xgroup, 
 .     verbose = verbose)
8. WriteH5Group(x = x[, i, drop = TRUE], name = i, hgroup = xgroup, 
 .     verbose = verbose)
9. xgroup$create_attr(attr_name = "names", robj = intersect(x = names(x = x), 
 .     y = names(x = xgroup)), dtype = GuessDType(x = names(x = x)[1]))

session info

─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.1 (2023-06-16)
 os       Ubuntu 18.04.6 LTS
 system   x86_64, linux-gnu
 ui       X11
 language zh_CN:zh
 collate  zh_CN.UTF-8
 ctype    zh_CN.UTF-8
 tz       Asia/Shanghai
 date     2024-06-15
 pandoc   2.12 @ /bin/pandoc

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package          * version    date (UTC) lib source
 abind              1.4-5      2016-07-21 [1] CRAN (R 4.3.1)
 backports          1.4.1      2021-12-13 [1] CRAN (R 4.3.1)
 base64enc          0.1-3      2015-07-28 [1] CRAN (R 4.3.1)
 bit                4.0.5      2022-11-15 [1] CRAN (R 4.3.1)
 bit64              4.0.5      2020-08-30 [1] CRAN (R 4.3.1)
 broom              1.0.5      2023-06-09 [1] CRAN (R 4.3.1)
 car                3.1-2      2023-03-30 [1] CRAN (R 4.3.1)
 carData            3.0-5      2022-01-06 [1] CRAN (R 4.3.1)
 cli                3.6.2      2023-12-11 [1] CRAN (R 4.3.1)
 cluster            2.1.4      2022-08-22 [1] CRAN (R 4.3.1)
 codetools          0.2-20     2024-03-31 [1] CRAN (R 4.3.1)
 colorspace         2.1-0      2023-01-23 [1] CRAN (R 4.3.1)
 cowplot            1.1.1      2020-12-30 [1] CRAN (R 4.3.1)
 crayon             1.5.2      2022-09-29 [1] CRAN (R 4.3.1)
 data.table         1.14.8     2023-02-17 [1] CRAN (R 4.3.1)
 deldir             1.0-9      2023-05-17 [1] CRAN (R 4.3.1)
 digest             0.6.35     2024-03-11 [1] CRAN (R 4.3.1)
 dotCall64          1.1-1      2023-11-28 [1] CRAN (R 4.3.1)
 dplyr            * 1.1.3      2023-09-03 [1] CRAN (R 4.3.1)
 ellipsis           0.3.2      2021-04-29 [1] CRAN (R 4.3.1)
 evaluate           0.22       2023-09-29 [1] CRAN (R 4.3.1)
 fansi              1.0.5      2023-10-08 [1] CRAN (R 4.3.1)
 fastmap            1.1.1      2023-02-24 [1] CRAN (R 4.3.1)
 fitdistrplus       1.1-11     2023-04-25 [1] CRAN (R 4.3.1)
 future             1.33.0     2023-07-01 [1] CRAN (R 4.3.1)
 future.apply       1.11.0     2023-05-21 [1] CRAN (R 4.3.1)
 generics           0.1.3      2022-07-05 [1] CRAN (R 4.3.1)
 ggplot2          * 3.4.4      2023-10-12 [1] CRAN (R 4.3.1)
 ggpubr           * 0.6.0      2023-02-10 [1] CRAN (R 4.3.1)
 ggrepel            0.9.4      2023-10-13 [1] CRAN (R 4.3.1)
 ggridges           0.5.4      2022-09-26 [1] CRAN (R 4.3.1)
 ggsignif           0.6.4      2022-10-13 [1] CRAN (R 4.3.1)
 globals            0.16.2     2022-11-21 [1] CRAN (R 4.3.1)
 glue               1.7.0      2024-01-09 [1] CRAN (R 4.3.1)
 goftest            1.2-3      2021-10-07 [1] CRAN (R 4.3.1)
 gridExtra          2.3        2017-09-09 [1] CRAN (R 4.3.1)
 gtable             0.3.4      2023-08-21 [1] CRAN (R 4.3.1)
 hdf5r              1.3.10     2024-03-02 [1] CRAN (R 4.3.1)
 here               1.0.1      2020-12-13 [1] CRAN (R 4.3.1)
 htmltools          0.5.6.1    2023-10-06 [1] CRAN (R 4.3.1)
 htmlwidgets        1.6.2      2023-03-17 [1] CRAN (R 4.3.1)
 httpuv             1.6.11     2023-05-11 [1] CRAN (R 4.3.1)
 httr               1.4.7      2023-08-15 [1] CRAN (R 4.3.1)
 ica                1.0-3      2022-07-08 [1] CRAN (R 4.3.1)
 igraph             1.5.1      2023-08-10 [1] CRAN (R 4.3.1)
 IRdisplay          1.1        2022-01-04 [1] CRAN (R 4.3.1)
 IRkernel           1.3.2      2023-09-23 [1] local
 irlba              2.3.5.1    2022-10-03 [1] CRAN (R 4.3.1)
 jsonlite           1.8.7      2023-06-29 [1] CRAN (R 4.3.1)
 KernSmooth         2.23-22    2023-07-10 [1] CRAN (R 4.3.1)
 later              1.3.1      2023-05-02 [1] CRAN (R 4.3.1)
 lattice            0.22-5     2023-10-24 [1] CRAN (R 4.3.1)
 lazyeval           0.2.2      2019-03-15 [1] CRAN (R 4.3.1)
 leiden             0.4.3      2022-09-10 [1] CRAN (R 4.3.1)
 lifecycle          1.0.3      2022-10-07 [1] CRAN (R 4.3.1)
 listenv            0.9.1      2024-01-29 [1] CRAN (R 4.3.1)
 lmtest             0.9-40     2022-03-21 [1] CRAN (R 4.3.1)
 magrittr           2.0.3      2022-03-30 [1] CRAN (R 4.3.1)
 MASS               7.3-60     2023-05-04 [1] CRAN (R 4.3.1)
 Matrix             1.6-1.1    2023-09-18 [1] CRAN (R 4.3.1)
 matrixStats        1.0.0      2023-06-02 [1] CRAN (R 4.3.1)
 mime               0.12       2021-09-28 [1] CRAN (R 4.3.1)
 miniUI             0.1.1.1    2018-05-18 [1] CRAN (R 4.3.1)
 munsell            0.5.0      2018-06-12 [1] CRAN (R 4.3.1)
 nlme               3.1-163    2023-08-09 [1] CRAN (R 4.3.1)
 parallelly         1.37.1     2024-02-29 [1] CRAN (R 4.3.1)
 patchwork        * 1.1.3      2023-08-14 [1] CRAN (R 4.3.1)
 pbapply            1.7-2      2023-06-27 [1] CRAN (R 4.3.1)
 pbdZMQ             0.3-10     2023-09-05 [1] CRAN (R 4.3.1)
 pillar             1.9.0      2023-03-22 [1] CRAN (R 4.3.1)
 pkgconfig          2.0.3      2019-09-22 [1] CRAN (R 4.3.1)
 plotly             4.10.2     2023-06-03 [1] CRAN (R 4.3.1)
 plyr               1.8.9      2023-10-02 [1] CRAN (R 4.3.1)
 png                0.1-8      2022-11-29 [1] CRAN (R 4.3.1)
 polyclip           1.10-6     2023-09-27 [1] CRAN (R 4.3.1)
 progressr          0.14.0     2023-08-10 [1] CRAN (R 4.3.1)
 promises           1.2.1      2023-08-10 [1] CRAN (R 4.3.1)
 purrr              1.0.2      2023-08-10 [1] CRAN (R 4.3.1)
 R6                 2.5.1      2021-08-19 [1] CRAN (R 4.3.1)
 RANN               2.6.1      2019-01-08 [1] CRAN (R 4.3.1)
 rappdirs           0.3.3      2021-01-31 [1] CRAN (R 4.3.1)
 RColorBrewer       1.1-3      2022-04-03 [1] CRAN (R 4.3.1)
 Rcpp               1.0.12     2024-01-09 [1] CRAN (R 4.3.1)
 RcppAnnoy          0.0.21     2023-07-02 [1] CRAN (R 4.3.1)
 repr               1.1.6      2023-01-26 [1] CRAN (R 4.3.1)
 reshape2           1.4.4      2020-04-09 [1] CRAN (R 4.3.1)
 reticulate         1.34.0     2023-10-12 [1] CRAN (R 4.3.1)
 rlang              1.1.4      2024-06-04 [1] CRAN (R 4.3.1)
 ROCR               1.0-11     2020-05-02 [1] CRAN (R 4.3.1)
 rprojroot          2.0.3      2022-04-02 [1] CRAN (R 4.3.1)
 rstatix            0.7.2      2023-02-01 [1] CRAN (R 4.3.1)
 Rtsne              0.16       2022-04-17 [1] CRAN (R 4.3.1)
 scales             1.2.1      2022-08-20 [1] CRAN (R 4.3.1)
 scattermore        1.2        2023-06-12 [1] CRAN (R 4.3.1)
 sceasy             0.0.7      2023-07-19 [1] local
 sctransform        0.4.1      2023-10-19 [1] CRAN (R 4.3.1)
 sessioninfo        1.2.2      2021-12-06 [1] CRAN (R 4.3.1)
 Seurat           * 4.4.0      2023-09-28 [1] CRAN (R 4.3.1)
 SeuratDisk       * 0.0.0.9021 2024-06-14 [1] Github (mojaveazure/seurat-disk@877d4e1)
 SeuratObject     * 5.0.0      2023-10-26 [1] CRAN (R 4.3.1)
 shiny              1.7.5.1    2023-10-14 [1] CRAN (R 4.3.1)
 sp                 2.1-1      2023-10-16 [1] CRAN (R 4.3.1)
 spam               2.9-1      2022-08-07 [1] CRAN (R 4.3.1)
 spatstat.data      3.0-1      2023-03-12 [1] CRAN (R 4.3.1)
 spatstat.explore   3.2-3      2023-09-07 [1] CRAN (R 4.3.1)
 spatstat.geom      3.2-5      2023-09-05 [1] CRAN (R 4.3.1)
 spatstat.random    3.1-6      2023-09-09 [1] CRAN (R 4.3.1)
 spatstat.sparse    3.0-2      2023-06-25 [1] CRAN (R 4.3.1)
 spatstat.utils     3.0-3      2023-05-09 [1] CRAN (R 4.3.1)
 stringi            1.7.12     2023-01-11 [1] CRAN (R 4.3.1)
 stringr            1.5.0      2022-12-02 [1] CRAN (R 4.3.1)
 survival           3.5-7      2023-08-14 [1] CRAN (R 4.3.1)
 tensor             1.5        2012-05-05 [1] CRAN (R 4.3.1)
 tibble             3.2.1      2023-03-20 [1] CRAN (R 4.3.1)
 tidyr              1.3.0      2023-01-24 [1] CRAN (R 4.3.1)
 tidyselect         1.2.0      2022-10-10 [1] CRAN (R 4.3.1)
 utf8               1.2.4      2023-10-22 [1] CRAN (R 4.3.1)
 uuid               1.1-1      2023-08-17 [1] CRAN (R 4.3.1)
 uwot               0.1.16     2023-06-29 [1] CRAN (R 4.3.1)
 vctrs              0.6.4      2023-10-12 [1] CRAN (R 4.3.1)
 viridisLite        0.4.2      2023-05-02 [1] CRAN (R 4.3.1)
 withr              2.5.1      2023-09-26 [1] CRAN (R 4.3.1)
 xtable             1.8-4      2019-04-21 [1] CRAN (R 4.3.1)
 zoo                1.8-12     2023-04-13 [1] CRAN (R 4.3.1)