Biowulf High Performance Computing at the NIH
VG on Biowulf
variation graph data structures, interchange formats, alignment, genotyping, and variant calling methods
Variation graphs provide a succinct encoding of the sequences of many genomes. A variation graph (in particular as implemented in vg) is composed of:
  • nodes, which are labeled by sequences and ids
  • edges, which connect two nodes via either of their respective ends
  • paths, which describe genomes, sequence alignments, and annotations (such as gene models and transcripts) as walks through nodes connected by edges
This model is similar to sequence graphs that have been used in assembly and multiple sequence alignment.

References:

See vgteam/Citing VG for additional references of specific subcommands.
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 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 vg

[user@cn3144 ~]$ vg construct -r $VG_HOME/test/small/x.fa -v $VG_HOME/test/small/x.vcf.gz > x.vg

[user@cn3144 ~]$ 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. vg.sh). For example:

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

vg autoindex --workflow giraffe -r $VG_HOME/test/small/x.fa -v $VG_HOME/test/small/x.vcf.gz -p x

vg sim -n 1000 -l 150 -x x.giraffe.gbz -a > x.sim.gam

vg giraffe -Z x.giraffe.gbz -G x.sim.gam -o BAM > aln.bam

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=#] [--mem=#] vg.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. vg.swarm). For example:

vg giraffe -t $SLURM_CPUS_PER_TASK -Z x.giraffe.gbz -G x.sim.gam -o BAM > x-aln.bam
vg giraffe -t $SLURM_CPUS_PER_TASK -Z y.giraffe.gbz -G y.sim.gam -o BAM > y-aln.bam
vg giraffe -t $SLURM_CPUS_PER_TASK -Z z.giraffe.gbz -G z.sim.gam -o BAM > z-aln.bam

Submit this job using the swarm command.

swarm -f vg.swarm [-g #] [-t #] --module vg
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 vg Loads the VG module for each subjob in the swarm