How to install Spatialsnake?
Important
Make sure your Linux system already includes basic required software such as conda and git. Install either Miniconda or Conda before proceeding. You may also install Mamba if you want faster environment solving.
Option 1: Install Spatialsnake from pypi
## STEP 1: Create conda environment with conda
conda config --add channels defaults && conda config --add channels bioconda && conda config --add channels conda-forge
conda create -n spatialsnake_env python=3.12.11 snakemake-minimal=9.8.1 r-base=4.4.0 -y # create the base environment required for Spatialsnake
## STEP 2: Activate the conda environment and install R packages
conda activate spatialsnake_env
conda install -c conda-forge r-optparse r-tidyverse r-future r-jsonlite r-rcolorbrewer r-patchwork r-cowplot r-pheatmap r-seurat r-remotes r-biocmanager r-presto r-nmf r-circlize
conda install -c bioconda bioconductor-annotationdbi bioconductor-complexheatmap bioconductor-clusterprofiler bioconductor-edger bioconductor-org.hs.eg.db bioconductor-org.mm.eg.db bioconductor-rhdf5 bioconductor-biocneighbors
conda install -c conda-forge bbknn cython
## STEP 3: install Spatialsnake from pypi
pip install spatialsnake
spatialsnake --version # check the version of spatialsnake installed
# if you want to use the extended features, install the following packages to use the whole spatialsnake package.[downstream_analysis and utility tools]
pip install spatialsnake[extended]
spatialsnake --install-packages
Option 2: Install Spatialsnake from conda
## STEP 1: Create conda environment with conda
conda config --add channels defaults && conda config --add channels bioconda && conda config --add channels conda-forge
conda create -n spatialsnake_env python=3.12.11 snakemake-minimal=9.8.1 r-base=4.4.0 -y # create the base environment required for Spatialsnake
conda activate spatialsnake_env
conda install spatialsnake -c bioconda -c conda-forge
spatialsnake --version # check the version of spatialsnake installed
# if you want to use the extended features, install the following packages to use the whole spatialsnake package.[downstream_analysis and utility tools]
pip install spatialsnake[extended]
spatialsnake --install-packages
Option 3: Install Spatialsnake from source code
## STEP 1: Create conda environment with conda
conda config --add channels defaults && conda config --add channels bioconda && conda config --add channels conda-forge
conda create -n spatialsnake_env python=3.12.11 snakemake-minimal=9.8.1 r-base=4.4.0 -y # Create a conda environment with the required packages
## STEP 2: Activate the conda environment and install R packages
conda activate spatialsnake_env
conda install -c conda-forge r-optparse r-tidyverse r-future r-jsonlite r-rcolorbrewer r-patchwork r-cowplot r-pheatmap r-seurat r-remotes r-biocmanager r-presto r-nmf r-circlize
conda install -c bioconda bioconductor-annotationdbi bioconductor-complexheatmap bioconductor-clusterprofiler bioconductor-edger bioconductor-org.hs.eg.db bioconductor-org.mm.eg.db bioconductor-rhdf5 bioconductor-biocneighbors
conda install -c conda-forge bbknn cython
# make sure your git is installed
git clone https://github.com/zhenghlin/spatialsnake.git
cd spatialsnake
python -m pip install .
python -m pip install ".[extended]"
spatialsnake --version # check the version of spatialsnake installed
spatialsnake --install-packages # install the required R packages from github which are not available in the pypi or bioconda
Note
If you encounter installation or environment errors, please open an issue on GitHub and we will respond as soon as possible. Version information for key dependencies can be found in requirements.txt and requirements-extended.txt in the repository.
We recommend installing Spatialsnake in a fresh conda environment to avoid conflicts with other existing environments.
If your hardware resources are limited, we recommend starting with the minimal Spatialsnake installation to avoid pulling in a large number of optional dependencies.
With the minimal Spatialsnake installation, the following modules are available:
integrate
preprocess
clustering
reclustering
annotation_help
annotation*mannul/cell2Location
reclustering
reannotation
utility_tools*merge/split
If you additionally run the built-in command spatialsnake --install-packages to install extended dependencies, the following modules become available:
annotation*RCTD
compare_stage
utility_tools*transforms
downstream_analysis-banksy
downstream_analysis-cellchat
If you install the spatialsnake[extended] package, the following additional modules become available:
downstream_analysis-*
For a basic introduction to the command-line workflow, see Usage of Spatialsnake