Skip to content

Commit 0149e46

Browse files
committed
Add support of Snakemake 8 and 9
1 parent 05ef15a commit 0149e46

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,20 @@ and performs the analysis in a single step:
3131
./run_default_VIPERA.sh
3232
```
3333

34-
This Snakemake workflow is compatible with both local execution and HPC environments utilizing SLURM. It supports dependency management through either conda or Singularity, as detailed in the [run modes documentation](config/README.md#run-modes).
34+
The workflow is compatible with both local execution and HPC environments utilizing SLURM.
35+
The latter requires installing the [Snakemake executor plugin for SLURM](https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html).
36+
It supports dependency management through either conda or Singularity, as detailed in the
37+
[run modes documentation](config/README.md#run-modes).
3538

36-
Please refer to the [full workflow documentation](config/README.md) for detailed setup instructions.
39+
Please refer to the [**full workflow documentation**](config/README.md) for detailed setup instructions.
3740

3841
> The documentation in this repository provides instructions for running VIPERA
39-
> with Snakemake <8. We recommend using Snakemake 7.32.
40-
> However, using Snakemake 8 is possible with minimal modifications (see the
42+
> with Snakemake <8. We used Snakemake 7.32 for the original publication,
43+
> but using Snakemake 8 or 9 is possible with minimal modifications (see the
4144
> [migration documentation](https://snakemake.readthedocs.io/en/stable/getting_started/migration.html)).
42-
> For example, `--use-conda` and `--use-singularity` are deprecated in Snakemake 8,
43-
> and `--software-deployment-method conda apptainer` is the preferred way to provide the options. Additionally, SLURM support is only available after installing an
44-
> [executor plugin for slurm](https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html).
45+
> For example, [profiles](https://snakemake.readthedocs.io/en/stable/getting_started/migration.html#profiles)
46+
should be backwards compatible, but `--use-conda` is deprecated starting on Snakemake 8 and
47+
`--software-deployment-method conda` is the preferred way to provide the options.
4548

4649
## Contributors
4750

run_default_VIPERA.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ mv ${tmpdir}/**/*.fa data/fasta
4343
mv ${tmpdir}/**/*.csv data
4444

4545
logthis "Running VIPERA"
46-
snakemake --use-conda -c ${NCPU}
46+
sm_version=$(snakemake --version | grep -oE "^[0-9]+")
47+
if [ $sm_version -ge 8 ]; then
48+
logthis "Launching with snakemake >= 8"
49+
snakemake --software-deployment-method conda -c ${NCPU}
50+
else
51+
logthis "Launching with snakemake < 8"
52+
snakemake --use-conda -c ${NCPU}
53+
fi
4754

4855
logthis "Cleaning up"
4956
rm -r ${tmpdir}

0 commit comments

Comments
 (0)