Installation

1. Prepare Python environment

To install SpaDCN, we recommend using the [Anaconda](https://anaconda.org/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) Python Distribution and creating an isolated environment, so that the SpaDCN and dependencies don’t conflict or interfere with other packages or applications. Please install the conda in advance.

Create environment First, please download or clone the SpaDCN.zip file from github Code and unzip it.

git clone https://github.com/bxslalala/SpaDCN.git

The entire installation process takes place in the SpaDCN directory, so first go to that directory by:

cd SpaDCN

We recommend using a conda environment to configure SpaDCN. To create and activate the environment SpaDCN_ENV, run the following command in bash or Anaconda Powershell Prompt:

conda create -n SpaDCN_ENV python=3.8
conda activate SpaDCN_ENV

2. Prepare R environment

The SpaDCN uses the mclust package in the R language environment, and links it in a Python environment via rpy2. You can install the R language environment under SpaDCN_ENV environment by:

conda install -c conda-forge r-base
conda install -c conda-forge r-mclust=5.4.10

3. Install dependency packages

If you want to install SpaDCN, you can install the dependency packages using pip by:

pip install -r requirements.txt

Here, the environment configuration is completed!