single-cell-data / TileDB-SOMA

Python and R SOMA APIs using TileDB’s cloud-native format. Ideal for single-cell data at any scale.
https://tiledbsoma.readthedocs.io
MIT License
91 stars 25 forks source link

[r] `to_seurat` error #1391

Closed Liripo closed 1 year ago

Liripo commented 1 year ago
experiment <- load_dataset("soma-exp-pbmc-small")

query <- SOMAExperimentAxisQuery$new(
  experiment = experiment,
  measurement_name = "RNA",
)

query$to_seurat(
  X_layers = c(counts = "counts", data = "data"),
  obs_index = "obs_id",
  var_index = "var_id"
)

I run the above code and get error:

Error in match.arg(arg = layer, choices = Layers(object = object, search = FALSE)) : 
  'arg' should be one of “counts”, “data”, “scale.data”

My seurat version is 4.9.9.9041

> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RcppSpdlog_0.0.12     tiledbsoma_0.0.0.9024
johnkerl commented 1 year ago

@mojaveazure can you take a look please?

aaronwolen commented 1 year ago

@Liripo, could install the most recent dev version of tiledbsoma to see if the issue has been resolved? I have 0.0.0.9030 installed locally and couldn't reproduce the same problem:

library(tiledbsoma)

experiment <- load_dataset("soma-exp-pbmc-small")

query <- SOMAExperimentAxisQuery$new(
  experiment = experiment,
  measurement_name = "RNA",
)

query$to_seurat(
  X_layers = c(counts = "counts", data = "data"),
  obs_index = "obs_id",
  var_index = "var_id"
)
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, will retire in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
#> The sp package is now running under evolution status 2
#>      (status 2 uses the sf package in place of rgdal)
#> An object of class Seurat 
#> 230 features across 80 samples within 1 assay 
#> Active assay: RNA (230 features, 0 variable features)
#>  2 dimensional reductions calculated: pca, tsne

sessioninfo::package_info()
#>  package      * version    date (UTC) lib source
#>  arrow          12.0.1     2023-06-15 [1] CRAN (R 4.3.0)
#>  assertthat     0.2.1      2019-03-21 [1] CRAN (R 4.3.0)
#>  bit            4.0.5      2022-11-15 [1] CRAN (R 4.3.0)
#>  bit64          4.0.5      2020-08-30 [1] CRAN (R 4.3.0)
#>  cli            3.6.1      2023-03-23 [1] CRAN (R 4.3.0)
#>  codetools      0.2-19     2023-02-01 [2] CRAN (R 4.3.0)
#>  data.table     1.14.8     2023-02-17 [1] CRAN (R 4.3.0)
#>  digest         0.6.32     2023-06-26 [1] CRAN (R 4.3.0)
#>  evaluate       0.21       2023-05-05 [1] CRAN (R 4.3.0)
#>  fastmap        1.1.1      2023-02-24 [1] CRAN (R 4.3.0)
#>  fs             1.6.2      2023-04-25 [1] CRAN (R 4.3.0)
#>  future         1.32.0     2023-03-07 [1] CRAN (R 4.3.0)
#>  future.apply   1.11.0     2023-05-21 [1] CRAN (R 4.3.0)
#>  globals        0.16.2     2022-11-21 [1] CRAN (R 4.3.0)
#>  glue           1.6.2      2022-02-24 [1] CRAN (R 4.3.0)
#>  htmltools      0.5.5      2023-03-23 [1] CRAN (R 4.3.0)
#>  knitr          1.43       2023-05-25 [1] CRAN (R 4.3.0)
#>  lattice        0.21-8     2023-04-05 [2] CRAN (R 4.3.0)
#>  lifecycle      1.0.3      2022-10-07 [1] CRAN (R 4.3.0)
#>  listenv        0.9.0      2022-12-16 [1] CRAN (R 4.3.0)
#>  magrittr       2.0.3      2022-03-30 [1] CRAN (R 4.3.0)
#>  Matrix         1.5-4.1    2023-05-18 [2] CRAN (R 4.3.0)
#>  nanotime       0.3.7      2022-10-24 [1] CRAN (R 4.3.0)
#>  parallelly     1.36.0     2023-05-26 [1] CRAN (R 4.3.0)
#>  progressr      0.13.0     2023-01-10 [1] CRAN (R 4.3.0)
#>  purrr          1.0.1      2023-01-10 [1] CRAN (R 4.3.0)
#>  R.cache        0.16.0     2022-07-21 [1] CRAN (R 4.3.0)
#>  R.methodsS3    1.8.2      2022-06-13 [1] CRAN (R 4.3.0)
#>  R.oo           1.25.0     2022-06-12 [1] CRAN (R 4.3.0)
#>  R.utils        2.12.2     2022-11-11 [1] CRAN (R 4.3.0)
#>  R6             2.5.1      2021-08-19 [1] CRAN (R 4.3.0)
#>  Rcpp           1.0.10     2023-01-22 [1] CRAN (R 4.3.0)
#>  RcppCCTZ       0.2.12     2022-11-06 [1] CRAN (R 4.3.0)
#>  RcppSpdlog   * 0.0.13     2023-06-17 [1] CRAN (R 4.3.0)
#>  reprex         2.0.2      2022-08-17 [1] CRAN (R 4.3.0)
#>  rlang          1.1.1      2023-04-28 [1] CRAN (R 4.3.0)
#>  rmarkdown      2.22       2023-06-01 [1] CRAN (R 4.3.0)
#>  sessioninfo    1.2.2      2021-12-06 [1] CRAN (R 4.3.0)
#>  SeuratObject   4.1.3      2022-11-07 [1] CRAN (R 4.3.0)
#>  sp             2.0-0      2023-06-22 [1] CRAN (R 4.3.0)
#>  spdl           0.0.5      2023-06-18 [1] CRAN (R 4.3.0)
#>  styler         1.10.0     2023-05-24 [1] CRAN (R 4.3.0)
#>  tidyselect     1.2.0      2022-10-10 [1] CRAN (R 4.3.0)
#>  tiledb         0.19.1.7   2023-06-08 [1] https://tiledb-inc.r-universe.dev (R 4.3.0)
#>  tiledbsoma   * 0.0.0.9030 2023-06-30 [1] local
#>  triebeard      0.4.1      2023-03-04 [1] CRAN (R 4.3.0)
#>  urltools       1.7.3      2019-04-14 [1] CRAN (R 4.3.0)
#>  vctrs          0.6.3      2023-06-14 [1] CRAN (R 4.3.0)
#>  withr          2.5.0      2022-03-03 [1] CRAN (R 4.3.0)
#>  xfun           0.39       2023-04-20 [1] CRAN (R 4.3.0)
#>  yaml           2.3.7      2023-01-23 [1] CRAN (R 4.3.0)
#>  zoo            1.8-12     2023-04-13 [1] CRAN (R 4.3.0)
#> 
#>  [1] /Users/aaronwolen/R
#>  [2] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.3.0 (2023-04-21) #> os macOS Ventura 13.4.1 #> system x86_64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/Chicago #> date 2023-07-05 #> pandoc 3.0.1 @ /usr/local/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> arrow 12.0.1 2023-06-15 [1] CRAN (R 4.3.0) #> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.3.0) #> bit 4.0.5 2022-11-15 [1] CRAN (R 4.3.0) #> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.3.0) #> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.0) #> codetools 0.2-19 2023-02-01 [2] CRAN (R 4.3.0) #> data.table 1.14.8 2023-02-17 [1] CRAN (R 4.3.0) #> digest 0.6.32 2023-06-26 [1] CRAN (R 4.3.0) #> evaluate 0.21 2023-05-05 [1] CRAN (R 4.3.0) #> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0) #> fs 1.6.2 2023-04-25 [1] CRAN (R 4.3.0) #> future 1.32.0 2023-03-07 [1] CRAN (R 4.3.0) #> future.apply 1.11.0 2023-05-21 [1] CRAN (R 4.3.0) #> globals 0.16.2 2022-11-21 [1] CRAN (R 4.3.0) #> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0) #> htmltools 0.5.5 2023-03-23 [1] CRAN (R 4.3.0) #> knitr 1.43 2023-05-25 [1] CRAN (R 4.3.0) #> lattice 0.21-8 2023-04-05 [2] CRAN (R 4.3.0) #> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.0) #> listenv 0.9.0 2022-12-16 [1] CRAN (R 4.3.0) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0) #> Matrix 1.5-4.1 2023-05-18 [2] CRAN (R 4.3.0) #> nanotime 0.3.7 2022-10-24 [1] CRAN (R 4.3.0) #> parallelly 1.36.0 2023-05-26 [1] CRAN (R 4.3.0) #> progressr 0.13.0 2023-01-10 [1] CRAN (R 4.3.0) #> purrr 1.0.1 2023-01-10 [1] CRAN (R 4.3.0) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.3.0) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.3.0) #> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.3.0) #> R.utils 2.12.2 2022-11-11 [1] CRAN (R 4.3.0) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0) #> Rcpp 1.0.10 2023-01-22 [1] CRAN (R 4.3.0) #> RcppCCTZ 0.2.12 2022-11-06 [1] CRAN (R 4.3.0) #> RcppSpdlog * 0.0.13 2023-06-17 [1] CRAN (R 4.3.0) #> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.0) #> rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.0) #> rmarkdown 2.22 2023-06-01 [1] CRAN (R 4.3.0) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0) #> SeuratObject 4.1.3 2022-11-07 [1] CRAN (R 4.3.0) #> sp 2.0-0 2023-06-22 [1] CRAN (R 4.3.0) #> spdl 0.0.5 2023-06-18 [1] CRAN (R 4.3.0) #> styler 1.10.0 2023-05-24 [1] CRAN (R 4.3.0) #> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.3.0) #> tiledb 0.19.1.7 2023-06-08 [1] https://tiledb-inc.r-universe.dev (R 4.3.0) #> tiledbsoma * 0.0.0.9030 2023-06-30 [1] local #> triebeard 0.4.1 2023-03-04 [1] CRAN (R 4.3.0) #> urltools 1.7.3 2019-04-14 [1] CRAN (R 4.3.0) #> vctrs 0.6.3 2023-06-14 [1] CRAN (R 4.3.0) #> withr 2.5.0 2022-03-03 [1] CRAN (R 4.3.0) #> xfun 0.39 2023-04-20 [1] CRAN (R 4.3.0) #> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0) #> zoo 1.8-12 2023-04-13 [1] CRAN (R 4.3.0) #> #> [1] /Users/aaronwolen/R #> [2] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library #> #> ────────────────────────────────────────────────────────────────────────────── ```
johnkerl commented 1 year ago

@Liripo @aaronwolen closing as this appears to be resolved in dev, and we will have a new TileDB-SOMA release coming out soon which will pick up the fix.

Please let me know if I'm closing this in error, and we can reopen/revisit -- thank you!! :)