Biowulf High Performance Computing at the NIH
SPRUCE on Biowulf

SPRUCE (Somatic Phylogeny Reconstruction using Combinatorial Enumeration) is an algorithm for inferring the clonal evolution of single-nucleotide and copy-number variants given multi-sample bulk tumor sequencing data.

Documentation
Important Notes

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@biowulf]$ sinteractive --mem 150g --gres lscratch:10
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 spruce
[+] Loading Graphviz v2.40.1 ...
[+] Loading spruce, version 0-30-41e108b...
[user@cn3144 ~]$ cd /lscratch/$SLURM_JOB_ID
[user@cn3144 46116226]$ cp -r /fdb/spruce/* .
[user@cn3144 46116226]$ ln -s $(dirname $(which enumerate)) build # the examples hard-code the path to SPRUCE's executables...
[user@cn3144 46116226]$ cd result
[user@cn3144 result]$ ./run_sims.sh
[user@cn3144 46116226]$ ./run _A22.sh
[user@cn3144 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$
  The simulation requires high memory. Please check user dashboard for appropriate memory requirement. 

Batch job
Most jobs should be run as batch jobs.

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

#!/bin/bash
module load spruce
cd /lscratch/$SLURM_JOB_ID
cp -r /fdb/spruce/* .
ln -s $(dirname $(which enumerate)) build
cd result
./run_sims.sh

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=2] [--mem=150g] --gres lscratch:10 spruce.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. spruce.swarm). For example:

./run_sims1.sh  # refer to sbatch above 
./run_sims2.sh
./run_sims3.sh

Submit this job using the swarm command.

swarm -f spruce.swarm [-g 150] [-t 2] --module spruce
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 spruce Loads the spruce module for each subjob in the swarm