sims-lab / ccb-wiki

Wiki documenting the CBRG cluster setup
2 stars 0 forks source link

How to use Leiden clustering with Seurat? #7

Open lm687 opened 2 days ago

lm687 commented 2 days ago

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

liezeltamon commented 2 days ago

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)

mamba create -n leiden leidenalg numpy pandas

Using leidenalg in R

RETICULATE_PYTHON=/project/sims-lab/ltamon/mamba_installation/conda/envs/leiden/bin/python
library(reticulate)
reticulate::import("numpy")
reticulate::import("pandas")
reticulate::import("leidenalg")
kevinrue commented 2 days ago

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

Happy to explain more if needed