cellgeni/sceasy

sce to anndata error

Opened this issue · 0 comments

Hi,
I'm trying to convert a SingleCellExperiment object to anndata and I get an error.

My code:

library("sceasy")
library("reticulate")
use_condaenv('/gstore/home/chintalh/miniconda3/envs/env', required = T)
tmp<- sceasy::convertFormat(merged, from="sce", to="anndata", outFile='output_merge.h5ad')

Errror:

Error in value[[3L]](cond) : 
  'assay(<SingleCellExperiment>, i="character", ...)' invalid subscript 'i'
length(Nindex) == length(dim) is not TRUE

My sce object:

> merged
class: SingleCellExperiment 
dim: 58302 32982 
metadata(3): merge.info pca.info .internal
assays(3): reconstructed counts logcounts
rownames(58302): ENSG00000210049 ENSG00000211459 ... ENSG00000200220 ENSG00000262477
rowData names(8): rotation ID ... symbol desc
colnames(32982): LIB5437925_SAM24396519_AAACCTGCATGTTCCC-1
  LIB5437925_SAM24396519_AAACCTGGTAAATGAC-1 ... LIB5437933_SAM24396523_TTTGTCATCTTCAACT-1
  LIB5437933_SAM24396523_TTTGTCATCTTGAGAC-1
colData names(37): batch Sample ... sizeFactor cluster
reducedDimNames(3): corrected TSNE UMAP
altExpNames(0):
R version 4.0.0 (2020-04-24)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/local/lib/R/lib/libRblas.so
LAPACK: /gstore/home/penikals/.conda/envs/testr/lib/libmkl_rt.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               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    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] ShadowArray_0.99.25 DelayedArray_0.14.1 IRanges_2.22.2      S4Vectors_0.26.1    BiocGenerics_0.34.0 matrixStats_0.56.0 
[7] sceasy_0.0.6        reticulate_1.16    

loaded via a namespace (and not attached):
 [1] bitops_1.0-6                fs_1.5.0                    usethis_1.6.1               bit64_4.0.5                
 [5] devtools_2.3.1              httr_1.4.2                  filelock_1.0.2              rprojroot_1.3-2            
 [9] GenomeInfoDb_1.24.2         tools_4.0.0                 backports_1.1.10            R6_2.4.1                   
[13] irlba_2.3.3                 HDF5Array_1.16.1            gp.version_0.99.2           vipor_0.4.5                
[17] DBI_1.1.0                   gp.cache_0.98.8             colorspace_1.4-1            gp.auth_0.98.6             
[21] withr_2.2.0                 tidyselect_1.1.0            gridExtra_2.3               prettyunits_1.1.1          
[25] processx_3.4.3              bit_4.0.4                   curl_4.3                    compiler_4.0.0             
[29] cli_2.1.0                   Biobase_2.48.0              BiocNeighbors_1.6.0         desc_1.2.0                 
[33] scales_1.1.1                callr_3.4.3                 rappdirs_0.3.1              digest_0.6.26              
[37] rmarkdown_2.3               XVector_0.28.0              scater_1.16.3               pkgconfig_2.0.3            
[41] htmltools_0.5.0             sessioninfo_1.1.1           dbplyr_1.4.4                rlang_0.4.8                
[45] RSQLite_2.2.0               rstudioapi_0.11             DelayedMatrixStats_1.10.1   generics_0.0.2             
[49] jsonlite_1.7.0              BiocParallel_1.22.0         dplyr_1.0.2                 RCurl_1.98-1.2             
[53] magrittr_1.5                BiocSingular_1.4.0          GenomeInfoDbData_1.2.3      Matrix_1.3-4               
[57] Rhdf5lib_1.10.1             Rcpp_1.0.5                  ggbeeswarm_0.6.0            munsell_0.5.0              
[61] fansi_0.4.1                 viridis_0.5.1               lifecycle_0.2.0             yaml_2.2.1                 
[65] SummarizedExperiment_1.18.2 zlibbioc_1.34.0             rhdf5_2.32.2                BiocFileCache_1.12.1       
[69] pkgbuild_1.1.0              blob_1.2.1                  grid_4.0.0                  crayon_1.3.4               
[73] lattice_0.20-41             knitr_1.29                  ps_1.3.4                    pillar_1.4.6               
[77] GenomicRanges_1.40.0        base64url_1.4               pkgload_1.1.0               glue_1.4.2                 
[81] evaluate_0.14               getPass_0.2-2               remotes_2.2.0               vctrs_0.3.4                
[85] testthat_2.3.2              gtable_0.3.0                purrr_0.3.4                 assertthat_0.2.1           
[89] ggplot2_3.3.2               xfun_0.16                   rsvd_1.0.3                  viridisLite_0.3.0          
[93] ArtifactDB_1.0.35           SingleCellExperiment_1.10.1 tibble_3.0.4                beeswarm_0.2.3             
[97] memoise_1.1.0               ellipsis_0.3.1

Any tips appreciated, thanks!