module snakemake.run
¶
Module for executing Snakemake workflows.
Global Variables¶
- DUMMY_DATA
class SnakemakeExecutor
¶
Run snakemake with system calls.
Args:
run_config
: Run-specific parameters.exec_dir
: Directory in which the run is executed.config_file
: Path to Snakemake configuration file.bind_paths
: Paths to bind to Singularity container.
Attributes:
run_config
: Run-specific parameters.exec_dir
: Directory in which the run is executed.config_file
: Path to Snakemake configuration file.bind_paths
: Paths to bind to Singularity container.run_state
: State of the run.
method __init__
¶
__init__(
run_config: ConfigRun,
exec_dir: Path = PosixPath('/home/runner/work/zarp-cli/zarp-cli'),
config_file: Optional[Path] = None,
bind_paths: Optional[List[Path]] = None
) → None
Class constructor.
method compile_command
¶
compile_command(snakefile: Path) → List[str]
Compile Snakemake command as list of strings.
Args:
snakefile
: Path to Snakemake descriptor file.
method run
¶
run(cmd) → None
Run Snakemake command.
Run Snakemake workflow with a system call. The run state is set to SUCCESS
if the run was successful, and to ERROR
if the run failed.
Args:
cmd
: Snakemake command as list of strings.
Raises:
CalledProcessError
: If the Snakemake run failed.