Roy-lab / scMTNI

18 stars 3 forks source link

rliger not converting list -> matrix #16

Closed mapo121 closed 1 month ago

mapo121 commented 1 month ago

Hello,

I tried looking up this error on my own (following your tutorial)

plotByDatasetAndCluster
[1] "Reading sample1"
[1] "Added gene names"
[1] "Added colnames"
           atac_HSC-AAAATTCC atac_HSC-AAACTACT atac_HSC-AAAGGAAG
AC093818.1                 0          0.000000                 0
AC096772.6                 0          0.000000                 0
ACAT1                      0          3.464102                 0
ACTR10                     0          0.000000                 0
ACY3                       0          0.000000                 0
           atac_HSC-AAAGTTTA atac_HSC-AAATATGT
AC093818.1                 0                 0
AC096772.6                 0                 0
ACAT1                      0                 0
ACTR10                     0                 0
ACY3                       0                 0
[1] "Reading sample2"
[1] "Added gene names"
[1] "Added colnames"
           rna_hsc_1 rna_hsc_2 rna_hsc_4 rna_hsc_6 rna_hsc_14
AC093818.1         0  0.000000  0.000000         0          0
AC096772.6         0  0.000000  0.000000         0          0
ACAT1              0  1.358264  0.000000         0          0
ACTR10             0  0.000000  1.225855         0          0
ACY3               0  0.000000  0.000000         0          0
[1] "Done reading all samples"
Error in .m2sparse(from, ".gC") : 
  invalid type "list" in 'R_matrix_as_sparse'
Calls: createLiger ... createLigerDataset -> <Anonymous> -> asMethod -> .m2sparse
Execution halted

I have rliger (2.0.1) installed via conda. What rliger version are you using in your analysis?

rliger gives me this warning

Package `rliger` has been updated massively since version 1.99.0, including the object structure which is not compatible with old versions.

We recommand you backup your old analysis before overwriting any existing result.

`readLiger()` is provided for reading an RDS file storing an old object and it converts the object to the up-to-date structure.

I looked at my version of R-matrix

r-matrix 1.6_5 r43h316c678_0 conda-forge r-matrix.utils 0.9.8 r43hc72bb7e_3 conda-forge r-matrixstats 1.3.0 r43h57805ef_0 conda-forge

SuvojitHazra commented 1 month ago

Hi mapo121,

We are using a more primitive liger version (installed via conda) like (rliger_1.0.0 or rliger_1.0.1) alongside R-matrix version like Matrix_1.5-4.1.

Best, Suvojit, Roy-Lab.

mapo121 commented 1 month ago

Archive here: https://cran.r-project.org/src/contrib/Archive/rliger/

https://stackoverflow.com/questions/4739837/how-do-i-install-an-r-package-from-the-source-tarball-on-windows

mapo121 commented 1 month ago
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/Chicago
tzcode source: system (glibc)

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

other attached packages:
[1] rliger_1.0.1   Matrix_1.6-1.1 ggplot2_3.5.1  cowplot_1.1.3 

loaded via a namespace (and not attached):
 [1] bit_4.0.5         gtable_0.3.5      dplyr_1.1.4       compiler_4.3.1   
 [5] tidyselect_1.2.1  Rcpp_1.0.11       FNN_1.1.4         parallel_4.3.1   
 [9] scales_1.3.0      lattice_0.22-5    ica_1.0-3         plyr_1.8.9       
[13] R6_2.5.1          generics_0.1.3    patchwork_1.2.0   iterators_1.0.14 
[17] ggrepel_0.9.4     tibble_3.2.1      Rtsne_0.17        munsell_0.5.1    
[21] pillar_1.9.0      rlang_1.1.3       utf8_1.2.4        hdf5r_1.3.9      
[25] bit64_4.0.5       doParallel_1.0.17 cli_3.6.2         withr_3.0.0      
[29] magrittr_2.0.3    foreach_1.5.2     grid_4.3.1        irlba_2.3.5.1    
[33] mclust_6.1.1      lifecycle_1.0.4   vctrs_0.6.5       scattermore_1.2  
[37] glue_1.7.0        codetools_0.2-19  fansi_1.0.6       colorspace_2.1-0 
[41] pkgconfig_2.0.3