mojaveazure / seurat-disk

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

Conversion from h5Seurat to h5ad not preserving gene names #115

Open shahrozeabbas opened 2 years ago

shahrozeabbas commented 2 years ago

Hello,

I am experiencing the issue referenced here #95. I converted a Seurat object to h5Seurat then to h5ad. Feature names are appearing as numbers in the converted h5ad when read into python using scanpy.

> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /***/conda/envs/singlecell/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] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] S4Vectors_0.28.1      BiocGenerics_0.36.0   SeuratDisk_0.0.0.9019
[4] data.table_1.14.2     SeuratObject_4.0.4    Seurat_4.1.0         
[7] dplyr_1.0.8          

loaded via a namespace (and not attached):
  [1] nlme_3.1-157          matrixStats_0.62.0    spatstat.sparse_2.1-1
  [4] bit64_4.0.5           RcppAnnoy_0.0.19      RColorBrewer_1.1-3   
  [7] httr_1.4.2            sctransform_0.3.3     tools_4.0.5          
 [10] utf8_1.2.2            R6_2.5.1              irlba_2.3.5          
 [13] rpart_4.1.16          KernSmooth_2.23-20    uwot_0.1.11          
 [16] mgcv_1.8-40           DBI_1.1.2             lazyeval_0.2.2       
 [19] colorspace_2.0-3      withr_2.5.0           tidyselect_1.1.2     
 [22] gridExtra_2.3         bit_4.0.4             compiler_4.0.5       
 [25] cli_3.2.0             hdf5r_1.3.5           plotly_4.10.0        
 [28] scales_1.2.0          lmtest_0.9-40         spatstat.data_2.2-0  
 [31] ggridges_0.5.3        pbapply_1.5-0         goftest_1.2-3        
 [34] stringr_1.4.0         digest_0.6.29         spatstat.utils_2.3-0 
 [37] pkgconfig_2.0.3       htmltools_0.5.2       parallelly_1.31.1    
 [40] fastmap_1.1.0         htmlwidgets_1.5.4     rlang_1.0.2          
 [43] shiny_1.7.1           generics_0.1.2        zoo_1.8-10           
 [46] jsonlite_1.8.0        ica_1.0-2             spatstat.random_2.2-0
 [49] magrittr_2.0.3        patchwork_1.1.1       Matrix_1.4-1         
 [52] Rcpp_1.0.8.3          munsell_0.5.0         fansi_1.0.3          
 [55] abind_1.4-5           reticulate_1.24       lifecycle_1.0.1      
 [58] stringi_1.7.6         MASS_7.3-57           Rtsne_0.16           
 [61] plyr_1.8.7            grid_4.0.5            listenv_0.8.0        
 [64] promises_1.2.0.1      ggrepel_0.9.1         crayon_1.5.1         
 [67] miniUI_0.1.1.1        deldir_1.0-6          lattice_0.20-45      
 [70] cowplot_1.1.1         splines_4.0.5         tensor_1.5           
 [73] pillar_1.7.0          igraph_1.3.0          spatstat.geom_2.4-0  
 [76] future.apply_1.8.1    reshape2_1.4.4        codetools_0.2-18     
 [79] leiden_0.3.9          glue_1.6.2            png_0.1-7            
 [82] vctrs_0.4.1           httpuv_1.6.5          gtable_0.3.0         
 [85] RANN_2.6.1            purrr_0.3.4           spatstat.core_2.4-2  
 [88] polyclip_1.10-0       tidyr_1.2.0           scattermore_0.8      
 [91] future_1.25.0         assertthat_0.2.1      ggplot2_3.3.5        
 [94] mime_0.12             xtable_1.8-4          later_1.2.0          
 [97] survival_3.3-1        viridisLite_0.4.0     tibble_3.1.6         
[100] cluster_2.1.3         globals_0.14.0        fitdistrplus_1.1-8   
[103] ellipsis_0.3.2        ROCR_1.0-11 
jiawei-zhong commented 2 years ago

Hi, I had the same problem before. Maybe you can try sceasy.

cdiaz45 commented 2 years ago

I had this problem and it was due to the python version when reading the file. I think it worked fine for me with python3.8 (same version making and reading the file). If you can't make it work, I can look back in more detail if it helps.