Open fspecque opened 5 months ago
I had the same issue with the same seurat5.01 and umap-learn0.5.5 installed via Conda.
I had the same error and solved it for now by downgrading my umap-learn to 0.5.3 via reticulate.
Hi, I tried with umap-learn v0.5.3 but I end up with another error : 0it [00:00, ?it/s]
How may I be able to solve this please?
Here is my codes:
scdata_integrated <- RunUMAP(scdata_integrated, reduction = "pca",
+ umap.method = "umap-learn",
+ graph = "integrated_snn")
Also attaching my session info:
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 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/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Asia/Seoul
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] cowplot_1.1.1 viridis_0.6.4 viridisLite_0.4.2 ggplot2_3.4.4 dplyr_1.1.4 SeuratObject_4.1.4 Seurat_4.3.0 reticulate_1.34.0
loaded via a namespace (and not attached):
[1] deldir_2.0-2 pbapply_1.7-2 gridExtra_2.3 rlang_1.1.2 magrittr_2.0.3 RcppAnnoy_0.0.21 matrixStats_1.1.0
[8] ggridges_0.5.4 compiler_4.3.1 spatstat.geom_3.2-7 png_0.1-8 vctrs_0.6.5 reshape2_1.4.4 stringr_1.5.1
[15] pkgconfig_2.0.3 fastmap_1.1.1 ellipsis_0.3.2 labeling_0.4.3 utf8_1.2.4 promises_1.2.1 purrr_1.0.2
[22] xfun_0.41 jsonlite_1.8.7 goftest_1.2-3 later_1.3.1 spatstat.utils_3.0-4 irlba_2.3.5.1 parallel_4.3.1
[29] cluster_2.1.4 R6_2.5.1 ica_1.0-3 stringi_1.8.2 RColorBrewer_1.1-3 spatstat.data_3.0-3 parallelly_1.36.0
[36] lmtest_0.9-40 scattermore_1.2 knitr_1.45 Rcpp_1.0.11 tensor_1.5 future.apply_1.11.0 zoo_1.8-12
[43] sctransform_0.4.1 httpuv_1.6.12 Matrix_1.6-1 splines_4.3.1 igraph_1.5.1 tidyselect_1.2.0 rstudioapi_0.15.0
[50] abind_1.4-5 spatstat.random_3.2-2 codetools_0.2-19 miniUI_0.1.1.1 spatstat.explore_3.2-5 listenv_0.9.0 lattice_0.21-8
[57] tibble_3.2.1 plyr_1.8.9 withr_2.5.2 shiny_1.8.0 ROCR_1.0-11 Rtsne_0.16 future_1.33.0
[64] survival_3.5-7 polyclip_1.10-6 fitdistrplus_1.1-11 pillar_1.9.0 KernSmooth_2.23-22 plotly_4.10.3 generics_0.1.3
[71] sp_2.1-2 munsell_0.5.0 scales_1.3.0 globals_0.16.2 xtable_1.8-4 glue_1.6.2 lazyeval_0.2.2
[78] tools_4.3.1 data.table_1.14.8 RANN_2.6.1 leiden_0.4.3.1 grid_4.3.1 tidyr_1.3.0 colorspace_2.1-0
[85] nlme_3.1-163 patchwork_1.1.3 cli_3.6.1 spatstat.sparse_3.0-3 fansi_1.0.5 uwot_0.1.16 gtable_0.3.4
[92] digest_0.6.33 progressr_0.14.0 ggrepel_0.9.4 farver_2.1.1 htmlwidgets_1.6.3 htmltools_0.5.7 lifecycle_1.0.4
[99] httr_1.4.7 mime_0.12 MASS_7.3-60
have to downgrade the umap-learn=0.5.4 in conda env
Thanks for the tips on downgrading umap-learn
. Hopefully, the PR from January listed above will be reviewed soon. 🤞
Also a reminder to folks to restart their R sessions after downgrading. Seurat uses reticulate which loads python imports into memory.
You can double-check the versions of loaded libraries via:
> cat(names(reticulate::import("umap")), sep="\n")
aligned_umap
AlignedUMAP
catch_warnings
distances
layouts
numba
ParametricUMAP
pkg_resources
simplefilter
sparse
spectral
UMAP
umap_
utils
warn
> subset(reticulate::py_list_packages(), package=="umap-learn")
package version requirement channel
24 umap-learn 0.5.4 umap-learn=0.5.4 pypi
> umap_import$`__version__`
[1] "0.5.4"
> packageVersion("Seurat")
[1] ‘5.0.1’
> reticulate::py_config()
[elided]
umap: [elided]/lib/python3.11/site-packages/umap
NOTE: Python version was forced by use_python() function
>
If you've downgraded umap to 0.5.4
in the path returned by reticulate::py_config()
using pip, conda, etc., and the version of umap
is still a new version without a pkg_resources
, restart your R session and try these version checks again.
Hi !
I've noticed a bug when computing UMAP using a
Graph
(thus, usingumap-learn
). See the code below to reproduce. Please note that the version of theumap-learn
python module I'm using is0.5.5
and I've installed it using conda (conda-forge)Here's the output of
reticulate::py_last_error()
I've noticed in seurat/R/dimensional_reduction.R that the way to check for the version of
umap-learn
is not compatible with version 0.5.5 :It's seems that the change happen for version 0.5.5 (https://github.com/lmcinnes/umap/commit/c427b48c02ef9216649aa1032de8c4257296e670)
Thus, I think there might be a way to correct that, maybe with a
tryCatch
? Also,umap$`__version__`
might be a valid alternative. Best, FlorianPS: Here is the output of
sessionInfo()