theislab / zellkonverter

Conversion between scRNA-seq objects
https://theislab.github.io/zellkonverter/
Other
144 stars 27 forks source link

'X' matrix does not support transposition when using scanpy$datasets$pbmc3k() #98

Closed vjcitn closed 8 months ago

vjcitn commented 1 year ago
> library(reticulate)
1/6 packages newly attached/loaded, see sessionInfo() for details.
> sc = import("scanpy")
> p = sc$datasets$pbmc3k()
> p
AnnData object with n_obs × n_vars = 2700 × 32738
    var: 'gene_ids'
> library(zellkonverter)
1/25 packages newly attached/loaded, see sessionInfo() for details.
> pp = AnnData2SCE(p)
Warning message:
'X' matrix does not support transposition and has been skipped 

also

> p$X
Error in validObject(.Object) : 
  invalid class "dgRMatrix" object: 'Dim' slot does not have length 2

Session:

> sessionInfo()
R version 4.3.0 Patched (2023-04-24 r84317)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /home/stvjc/R-430-dist/lib/R/lib/libRblas.so 
LAPACK: /home/stvjc/R-430-dist/lib/R/lib/libRlapack.so;  LAPACK version 3.11.0

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       

time zone: America/New_York
tzcode source: system (glibc)

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

other attached packages:
 [1] SingleCellExperiment_1.23.0 SummarizedExperiment_1.31.1
 [3] Biobase_2.61.0              GenomicRanges_1.53.1       
 [5] GenomeInfoDb_1.37.1         IRanges_2.35.1             
 [7] S4Vectors_0.39.1            BiocGenerics_0.47.0        
 [9] MatrixGenerics_1.13.0       matrixStats_1.0.0          
[11] zellkonverter_1.11.1        reticulate_1.30            
[13] rmarkdown_2.22             

loaded via a namespace (and not attached):
 [1] Matrix_1.5-4.1          jsonlite_1.8.5          compiler_4.3.0         
 [4] crayon_1.5.2            filelock_1.0.2          Rcpp_1.0.10            
 [7] bitops_1.0-7            parallel_4.3.0          png_0.1-8              
[10] fastmap_1.1.1           lattice_0.21-8          here_1.0.1             
[13] XVector_0.41.1          S4Arrays_1.1.4          knitr_1.43             
[16] DelayedArray_0.27.5     rprojroot_2.0.3         GenomeInfoDbData_1.2.10
[19] rlang_1.1.1             dir.expiry_1.9.0        xfun_0.39              
[22] SparseArray_1.1.10      cli_3.6.1               withr_2.5.0            
[25] zlibbioc_1.47.0         digest_0.6.31           grid_4.3.0             
[28] basilisk_1.13.2         rappdirs_0.3.3          startup_0.20.0         
[31] evaluate_0.21           RCurl_1.98-1.12         basilisk.utils_1.13.2  
[34] tools_4.3.0             htmltools_0.5.5        
> 

and

stvjc@stvjc-XPS-13-9300:~/SFAIRA$ /home/stvjc/.local/share/r-miniconda/envs/r-reticulate/bin/pip list | grep scanp
scanpy                        1.9.3
lazappi commented 1 year ago

I think this may be cause by a {reticulate} bug so I have opened an issue there https://github.com/rstudio/reticulate/issues/1417.

lazappi commented 10 months ago

This should be fixed by updating to the latest {reticulate} version