Skip to content

On a Slurm cluster

A run is one command, which a cluster's job runs as it is. On a Slurm cluster (such as Maestro, at the Institut Pasteur), activate the environment, then submit each run with sbatch, asking for as many CPUs as --threads uses, and a few more:

micromamba activate tinymapper

sbatch --mem 40G -c 10 --wrap \
    "tinymapper -m ChIP -s ~/reads/JS001_IP -i ~/reads/JS001_input -g ~/genomes/S288c/S288c --threads 8"
sbatch --mem 40G -c 10 --wrap \
    "tinymapper -m RNA -s ~/reads/JS002 -g ~/genomes/S288c/S288c --threads 8"
sbatch --mem 40G -c 10 --wrap \
    "tinymapper -m HiC -s ~/reads/JS003 -g ~/genomes/S288c/S288c --threads 8"

The job's environment is the one it was submitted from: activate it first.

Many samples

Runs of several samples can share an output directory, each its own job: the files of a run carry its hash, its log and its report the sample's name (File formats).

for sample in JS001 JS002 JS003; do
    sbatch --mem 40G -c 10 --job-name "$sample" --wrap \
        "tinymapper -m ATAC -s ~/reads/$sample -g ~/genomes/S288c/S288c -o ~/results --threads 8"
done

Once they are done, MultiQC gathers their reports into one table (Many samples in one table).

tinyMapper.sh

Scripts written for the bash tinyMapper.sh, such as autotinymapper's, keep working: the package installs a tinyMapper.sh that runs tinymapper with the same options.

sbatch --mem 40G -c 10 --wrap \
    "tinyMapper.sh -m ChIP -s ~/reads/JS001_IP -g ~/genomes/S288c/S288c --threads 8"