wodanaz / Assembling_viruses

0 stars 0 forks source link

Add snakemake slurm config #50

Closed johnbradley closed 3 years ago

johnbradley commented 3 years ago

Adds slurm profile directory to allow running on HARDAC using the covid19lab account. All the /slurm profile files were created by running:

cookiecutter https://github.com/Snakemake-Profiles/slurm.git

See https://github.com/Snakemake-Profiles/slurm#quickstart for background. The GCB Analysis Core uses this profile for their scripts. The only file in slurm/ to take note of is slurm/settings.json which is where we specify to use the covid19lab account.

Installing/Activating Snakemake on HARDAC

You can create an environment for snakemake like so:

srun -p interactive --pty bash
module load Anaconda3/2019.10-gcb02
conda create -n snakemake -c conda-forge -c bioconda mamba snakemake
conda activate snakemake

Snakemake installation docs.

Running Snakemake on HARDAC

Once snakemake is installed and activated you can run the pipeline like so:

snakemake --profile slurm --cores 1 --use-conda

You can increase the --cores values to use up more cluster resources.

Fix

Fixes a bug in Snakefile where I was using the wrong environment for the samtools_index_genome rule. I just happened to have samtools installed on my laptop which allowed the workflow to run without the proper environment.


Part of issue #46