8000 How to use Leiden clustering with Seurat? · Issue #7 · sims-lab/ccb-wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

How to use Leiden clustering with Seurat? #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lm687 opened this issue Jul 5, 2024 · 2 comments
Open

How to use Leiden clustering with Seurat? #7

lm687 opened this issue Jul 5, 2024 · 2 comments
Labels
R R programming language Seurat Seurat - R package for single cell

Comments

@lm687
Copy link
lm687 commented Jul 5, 2024

Using reticulate - Carla, can we get the solution here? We had a minimal example. thanks

@lm687 lm687 added Seurat Seurat - R package for single cell R R programming language labels Jul 5, 2024
@liezeltamon
Copy link
liezeltamon commented Jul 5, 2024

This is what I do and it works also even when using renv:

Preparing conda environment with leidenalg for Seurat::FindClusters() (Last update: 2024-05-31)

  • reticulate R package will be used to load leidenalg python module and dependencies numpy and pandas
mamba create -n leiden leidenalg numpy pandas

Using leidenalg in R

  • Set RETICULATE_PYTHON in .Renviron to path of python environment with the packages for reticulate to find. For example:
RETICULATE_PYTHON=/project/sims-lab/ltamon/mamba_installation/conda/envs/leiden/bin/python
  • In R:
library(reticulate)
reticulate::import("numpy")
reticulate::import("pandas")
reticulate::import("leidenalg")

@kevinrue
Copy link
Collaborator
kevinrue commented Jul 5, 2024

Check out basilisk (Bioconductor) https://joss.theoj.org/papers/10.21105/joss.04742

Happy to explain more if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R R programming language Seurat Seurat - R package for single cell
Projects
None yet
Development

No branches or pull requests

3 participants
0