VIPER on Biowulf

VIPER is an RNA-seq analysis pipeline powered by Snakemake. VIPER combines the use of several dozen RNA-seq tools, suites, and packages to create a complete pipeline that takes RNA-seq analysis from raw sequencing data all the way through alignment, quality control, unsupervised analyses, differential expression, and downstream pathway analysis. In addition, VIPER has been outfitted with several recently published tools that allow for interrogation of immune and virus infiltrate. The results are compiled in a simple and highly visual report containing the key figures to explain the analysis, and then compiles all of the relevant files, tables, and pictures into an easy to navigate folder.

References:

Documentation
Important Notes

Before executing the pipeline, regardless of interactive or batch mode, you must prepare the run configuration:

[user@biowulf ~]$ module load viper
[user@biowulf ~]$ mkdir /data/$USER/viper
[user@biowulf ~]$ cd !$
[user@biowulf viper]$ cp $VIPER_HOME/config.yaml .
[user@biowulf viper]$ ln -s $VIPER_HOME viper # the workflow hardcodes relative paths to scripts within the installation tree...
[user@biowulf viper]$ ls
config.yaml
viper

You will need these files to define your run:

See the comments in the example files and the documentation for guidance.
Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program.
Sample session (user input in bold):

[user@biowulf]$ sinteractive
salloc.exe: Pending job allocation 46116226
salloc.exe: job 46116226 queued and waiting for resources
salloc.exe: job 46116226 has been allocated resources
salloc.exe: Granted job allocation 46116226
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3144 are ready for job

[user@cn3144 ~]$ module load viper
[+] Loading viper, version 0-20231003-1525270...
[user@cn3144 ~]$ cd /data/$USER/viper
[user@cn3144 viper]$ ls # your run configuration files should be here, prepared as described above
config.yaml
metasheet.csv
viper
[user@cn3144 viper]$ snakemake --snakefile $VIPER_HOME/viper.snakefile -n # try a dry run
...
[user@cn3144 viper]$ snakemake --snakefile $VIPER_HOME/viper.snakefile
...
[user@cn3144 viper]$ exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$

Batch job
Most jobs should be run as batch jobs.

Create a batch input file (e.g. viper.sh). For example:

#!/bin/bash
set -e
module load viper

test -n "$SLURM_CPUS_PER_TASK" || SLURM_CPUS_PER_TASK=2

snakemake --snakefile $VIPER_HOME/viper.snakefile -j $SLURM_CPUS_PER_TASK

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=#] [--mem=#] viper.sh
Swarm of Jobs
A swarm of jobs is an easy way to submit a set of independent commands requiring identical resources.

Create a swarmfile (e.g. viper.swarm). For example:

cd /data/$USER/viper/project1 && snakemake --snakefile $VIPER_HOME/viper.snakefile -j $SLURM_CPUS_PER_TASK
cd /data/$USER/viper/project2 && snakemake --snakefile $VIPER_HOME/viper.snakefile -j $SLURM_CPUS_PER_TASK
cd /data/$USER/viper/project3 && snakemake --snakefile $VIPER_HOME/viper.snakefile -j $SLURM_CPUS_PER_TASK
cd /data/$USER/viper/project4 && snakemake --snakefile $VIPER_HOME/viper.snakefile -j $SLURM_CPUS_PER_TASK
cd /data/$USER/viper/project5 && snakemake --snakefile $VIPER_HOME/viper.snakefile -j $SLURM_CPUS_PER_TASK

Submit this job using the swarm command.

swarm -f viper.swarm [-g #] [-t #] --module viper
where
-g # Number of Gigabytes of memory required for each process (1 line in the swarm command file)
-t # Number of threads/CPUs required for each process (1 line in the swarm command file).
--module viper Loads the VIPER module for each subjob in the swarm