What do you need to know about snakemake and Slurm?

What do you need to know about snakemake and Slurm?

Snakemake and slurm: a lovely pair. For those who are not familiar with the tools: Slurm is a job scheduler for Linux systems, used for instance to submit jobs to a cluster of computers and collect the results. Snakemake is a pipelining tool, particularly suitable for building bioinformatics data analysis workflows 1.

How to submit snakemake jobs to Slurm scheduler?

Snakemake can submit each of your jobs to the slurm scheduler for you! To enable this, you need to provide the –cluster option to snakemake on the command line, and include all of the sbatch information you normally put at the top of your submission files.

How do I enable snakemake on my cluster?

To enable this, you need to provide the –cluster option to snakemake on the command line, and include all of the sbatch information you normally put at the top of your submission files. Most clusters would prefer that you use an interactive session (or sbatch) to run this, so that you’re not running anything on the login nodes.

Where are the imperative settings stored in snakemake?

The imperative settings can be stored in a cluster.jsonfile in the configdirectory, and passed to the clusteroption of the Snakemake command line interface, or the parameter of the same name of the Snakemake API. Constraint settings

How is snakemake used in the command line?

Snakemake ensures that the total number of CPUs consumed by a Snakemake workflow does not exceed the total number of cores defined by –coresin the command line or the option coresin its API (see below, documented here).

How to request CPUs per node in Slurm?

Each stepcan consist of one or more tasks, each using one or more CPUs. Tasks can be requested either at the job level, using sbatchwith the option –tasks-per-node, or at the step level, srunwith the option –ntasks. CPUs are requested per task with –cpus-per-task.