Skip to content
Snippets Groups Projects

running the pipeline

more on this later...

Setting up an R environment

Two options - private pipeline-scope conda environment, or account-scope conda enviroment. Both are described below.

I recommend using Snakemake-Conda integration.

Using Snakemake-Conda integration to get R with packages installed

First load conda using the system module and snakemakeslurm

# optional - clean out other packages
module purge; module load shared rc-base
# load Anaconda & Snakemake with Slurm helper script
module load snakemakeslurm/4.8.0-2

Run snakemake, and tell it to build a private conda enviornment

snakemakeslurm --use-conda

Using an account Conda Environment

The conda environment required to run this pipeline is contained in envs/r332.bioc.deseq2.tidyverse.plotly.yml

Loading Anaconda

Run the following commands to load the appropriate Anaconda version

# optional - clean out other packages
module purge; module load shared rc-base
# load Conda & Snakemake with Slurm helper script
module load Anaconda3/5.2.0

Create Conda Environment From .yml File

Once you have the .yml file and Anaconda loaded, run the following to create the conda env

conda env create -f envs/r332.bioc.deseq2.tidyverse.plotly.yml 

Load r332.bioc.deseq2.tidyverse.plotly Environment

With the environment set up run the following to load the env before starting the pipeline

source activate r332.bioc.deseq2.tidyverse.plotly

Then run the pipeline

module load snakemakeslurm/4.8.0
snakemakeslurm 

When the pipeline has finished, run the following to unload the conda enviroment

source deactivate