Installation

SEDR package is mainly based on python.

1. Python

git clone https://github.com/JinmiaoChenLab/SEDR.git

cd SEDR

python setup.py build

python setup.py install

2. Anaconda

We highly recommend users to create a separate environment for SEDR.

conda create -n SEDR python=3.11

conda activate SEDR

git clone https://github.com/JinmiaoChenLab/SEDR.git

cd SEDR

python setup.py build

python setup.py install

Alternatively, you can install SEDR using a conda YAML file

git clone https://github.com/JinmiaoChenLab/SEDR.git

cd SEDR

conda env create -f environment.yml

conda activate SEDR

pip install .

To use SEDR in notebook,

pip install ipykernel

python -m ipykernel install --user --name=SEDR

The mclust R package is needed for running the notebooks. To install it, run the following lines in a python cell:

import rpy2.robjects.packages as rpackages
from rpy2.robjects.vectors import StrVector

# set R package names
packnames = ('mclust',)

# import R's utility package
utils = rpackages.importr('utils')

utils.chooseCRANmirror(ind=1) # select the first mirror in the list

# list and install missing packages
packnames_to_install = [x for x in packnames if not rpackages.isinstalled(x)]

if len(packnames_to_install) > 0:
    utils.install_packages(StrVector(packnames_to_install))