Getting Started
Installation
Sopa package
Sopa can be installed on every OS with pip
or poetry
.
The preferred Python version is python==3.10
, but we also support 3.11
and 3.12
.
Advice (optional)
We advise creating a new environment via a package manager (except if you use Poetry, which will automatically create the environment).
For instance, you can create a new conda
environment:
Choose one of the following, depending on your needs (it should take at most a few minutes):
To install extras (for example, if you want to use cellpose
/baysor
), please run:
Baysor usage
Even though pip install 'sopa[baysor]'
will install some dependencies related to baysor, you still have to install the baysor
command line (see the official documentation) if you want to use it.
If the Baysor executable is not at ~/.julia/bin/baysor
, please make the baysor
command available (e.g., via creating a symlink ~/.local/bin/baysor
pointing to executable), or export the path to the executable via export baysor=/path/to/baysor/executable
.
Snakemake setup
To use Snakemake, in addition to the above sopa
environment, you'll need to clone a repository containing the Snakemake workflow:
Also, make sure you have installed snakemake>=8.0.0
. This does not necessarily have to be inside the sopa
environment: for instance, you can create a new environment specific to snakemake:
# this will create a new environment called "snakemake"
conda create -c conda-forge -c bioconda -n snakemake snakemake
conda activate snakemake
Now, follow our snakemake tutorial to run your first pipeline.
Usage
Sopa comes in three different flavours, each corresponding to a different use case:
API
: use directlysopa
as a Python package for full flexibility and customization (see a tutorial here)Snakemake pipeline
: choose a config, and run our pipeline on your spatial data in a few minutes. See our snakemake tutorial.CLI
: use our command-line-interface to prototype quickly your own pipeline