Installation

SpaceTracer requires Python 3.9, samtools, bedtools and bcftools.

Clone the repository

First, clone the SpaceTracer repository from GitHub:

git clone https://github.com/douymLab/SpaceTracer.git
cd SpaceTracer

Prepare dependencies

Before running SpaceTracer, make sure all required dependencies are available in your environment. We provide two recommended ways to prepare the environment.

Option 1: Conda environment

You can create your own Conda environment using the provided environment.yaml file:

conda env create -f environment.yaml
conda activate SpaceTracer

Because environment.yaml contains many dependencies, we strongly recommend using mamba to create the environment:

mamba env create -f environment.yaml
conda activate SpaceTracer

Note

During environment creation, the pot or sorted-nearest packages may fail to install on some systems. If this happens, activate the SpaceTracer environment and install them separately:

mamba install -c conda-forge pot
pip install sorted-nearest

Install SpaceTracer into the activated environment (this provides the spacetracer command):

pip install .
spacetracer --help

Note

Conda must be installed before running these commands. Please refer to the official Conda documentation. If you plan to use mamba, please install it first from the mamba documentation.

Option 2: Docker image

We provide a Docker image, spacetracer, with all required dependencies preinstalled. The image is available on Docker Hub:

docker pull xiayh17/spacetracer
docker run -it -v $(pwd):/mnt/workflow xiayh17/spacetracer bash

You can also download the container image file spacetracer_latest.sif from Figshare.

This command runs the Docker container in interactive mode (-it), mounts the current working directory ($(pwd)) to /mnt/workflow inside the container, and starts a Bash shell.

Note

Docker must be installed on your machine before using this option. If Docker is not installed, please follow the official Docker installation guide.

Additional Python packages

If needed, install extras from:

pip install -r requirements_pip.txt