A set of utility functions for use in Snakemake workflows. Supports Snakemake 8+.
This package is intended for use within a Snakemake workflow project.
Install the Python package and dependency management tool poetry using official documentation.
You must have Python 3.11 or greater available on your system path, which could be managed by mamba, pyenv, or another package manager.
If you have a mamba environment for the parent project, activate it first.
Install with poetry.
poetry installSet the onerror directive in a Snakemake workflow to point to the fgsmk.on_error function.
from fgsmk.log import on_error
onerror:
on_error(snakefile=Path(__file__), config=config, log=Path(log))
"""Block of code that gets called if the snakemake pipeline exits with an error."""This will produce a file error_summary.txt containing the last (up to) 50 lines of the log files of any rules that failed execution.
The content will also be output to stdout.
See the contributing guide for more information.