Skip to content

Commit

Permalink
enh: snakemake >8.0.0 execution on hpc
Browse files Browse the repository at this point in the history
  • Loading branch information
danilotat committed Nov 24, 2024
1 parent b6c1fe5 commit ee7f15c
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion docs/hpc.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Run on HPC

ENEO was developed and tested in High Performances Computing (HPC) clusters with the SLURM workload manager. Even if Snakemake introduced plugins in version `>8.0`, still the preferred way to launch the workload in SLURM is using a defined profile.
ENEO was developed and tested in High Performances Computing (HPC) clusters with the SLURM workload manager. Snakemake deeply changed the job submissions and handling after the major update introduced with the version 8.0.0. Currently more than a single way exists for submitting jobs using Snakemake, but the most effective one seems to be using the `cluster-generic` plugin.

If you're using Snakemake > 8.0.0, install the cluster-generic plugin using pip

```
pip install snakemake-executor-plugin-cluster-generic
```

Then inside the folder `worflow/profile` you'll find for each of the supported method (SLURM/SGE) two configuration files: one with the string `v8` in the name, used by Snakemake version >8.0.0, and a legacy `config.yaml`, for older versions.

!!! tip

The following notes reported examples using the legacy config file. However, the relevant edits are the same!

## Singularity args

Two rules of the workflow (variant annotation and pMHC binding affinity estimation) depend on Singularity containers. It's key to ensure that all the relevant folders are readable/writable within each container. For this reason, multiple folders are required to be mounted, as Snakemake is *lazy* in assigning mountpoints.

Populate the last entry of the config file, `singularity-args`, adding the absolute path for:

- the resources directory
- the temporary directory
- the output directory
- the workflow directory

Additionally, you had to set the TMPDIR environment variable to the temporary directory, to avoid writing permissions in the last step.


## SLURM

Expand Down

0 comments on commit ee7f15c

Please sign in to comment.