-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Stephan Reichl edited this page Dec 21, 2024
·
16 revisions
The following instructions should take less than 10 minutes to execute and hold true for any Snakemake workflow, including all MrBiomics modules.
- Install Snakemake (once), which requires conda and mamba, following the offical documentation (the full installation is recommended).
Most modules were developed and tested with Snakemake version
conda install -n base -c conda-forge mamba conda activate base mamba create -c conda-forge -c bioconda -n snakemake snakemake
8.25.3
(recommended).In case you are using multiple Snakemake versions simultaneously, indicate the version in the environment name.mamba create -c conda-forge -c bioconda -n snakemake snakemake=8.25.3
mamba create -c conda-forge -c bioconda -n snakemake8_25_3 snakemake=8.25.3
Note
Full Snakemake installation is required to load modules directly from GitHub. Using the minimal version requires including the provided global environment at the top of the Snakefile
, but disables module loading from GitHub due to an unresolved Snakemake issue.
- Setup Snakemake (once), by setting Snakemake environment variables for convenience (optional, but highly recommended).
- Configure a dedicated Snakemake conda environment folder (e.g., on a non-backed-up partition of your cluster) to avoid redundant installations and consolidate all conda environments installed by Snakemake in one easy-to-manage location.
# add this to your ~/.bashrc profile export SNAKEMAKE_CONDA_PREFIX=path/to/conda/directory
- Create a global Snakemake profile to configure default command line arguments (CLI) e.g.,
--software-deployment-method: conda
. Set the location of your global Snakemake profile.# add this to your ~/.bashrc profile export SNAKEMAKE_PROFILE=path/to/your/global/profile
- If you work on a cluster and/or cloud provider you should install the respective Snakemake executor and storage plugins, which serve as the interface between Snakemake and your infrastructure e.g., workload managers such as SLURM or data providers such as Azure. You can use the global Snakemake profile to configure default behavior e.g., executor or default resources. We are using this.
- Configure a dedicated Snakemake conda environment folder (e.g., on a non-backed-up partition of your cluster) to avoid redundant installations and consolidate all conda environments installed by Snakemake in one easy-to-manage location.
- Clone the
{module}
repository (only once per module).git clone [email protected]:user/{module}.git
Note
All workflow-specific software dependencies are installed and managed automatically via Snakemake and conda/mamba. They are installed upon the first run of the module.