Skip to content

Run on OSC

Meghan Balk edited this page Nov 22, 2023 · 17 revisions

Running the workflow on the OSC SLURM Cluster.

The following commands should be run from a login node after cloning this repo and changing into that directory.

Install Snakemake

The following commands

  • load the conda environment module
  • create the snakemake conda environment
  • unload the conda environment module
module load miniconda3/23.3.1-py310
conda create -c conda-forge -c bioconda -n snakemake snakemake=7.32.4 mamba=1.5.3 -y
module purge

Run Workflow

Before running the workflow you may want to change the config/config.yaml limit_images: 20 setting to limit_images: "". Be aware that downloading the all images and running the workflow takes a couple of hours. This will setup the workflow to process the entire dataset.

On OSC pulling large containers can fail with the default Singularity/Apptainer settings. See OSC article Failed to pull a large Docker image. To avoid this issue create a cache directory within the scratch space and set environment variables so it will be used.

mkdir /fs/ess/scratch/PAS2136/minnows-singularity-cache

The following commands

  • load the conda environment module
  • activate the snakemake conda environment
  • configure Apptainer/Singularity to use the scratch cache directory
  • start the sbatch job
module load miniconda3/23.3.1-py310
source activate snakemake
export APPTAINER_CACHEDIR=/fs/ess/scratch/PAS2136/minnows-singularity-cache
export APPTAINER_TMPDIR=/fs/ess/scratch/PAS2136/minnows-singularity-cache
sbatch --account=PAS2136 run-workflow.sh
Clone this wiki locally