High-Performance Computing at the NIH
GitHub YouTube @nih_hpc RSS Feed
Varsim on Biowulf

A high-fidelity simulation validation framework for high-throughput genome sequencing with cancer applications.

References:

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 --cpus-per-task=40 --mem=30g
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 varsim art  
[user@cn3144 ~]$ cp -r /fdb/varsim/examples /data/$USER/
[user@cn3144 ~]$ cd /data/$USER/examples
[user@cn3144 ~]$ varsim.py --vc_in_vcf All_20170710.vcf.gz --sv_insert_seq insert_seq.txt \
--sv_dgv GRCh37_hg19_supportingvariants_2013-07-23.txt --reference hs37d5.fa --id simu \
--read_length 100 --vc_num_snp 3000000 --vc_num_ins 100000 --vc_num_del 100000 \
--vc_num_mnp 50000 --vc_num_complex 50000 --sv_num_ins 2000 --sv_num_del 2000 \
--sv_num_dup 200 --sv_num_inv 1000 --sv_percent_novel 0.01 --vc_percent_novel 0.01 \
--mean_fragment_size 350 --sd_fragment_size 50 --vc_min_length_lim 0 --vc_max_length_lim 49 \
--sv_min_length_lim 50 --sv_max_length_lim 1000000 --nlanes 1 --total_coverage 1 \
--simulator_executable /usr/local/apps/art/20160605/bin/art_illumina \
--out_dir out --log_dir log --work_dir work --simulator art

[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. varsim.sh): For example:

#!/bin/bash
module load varsim art
cd /data/$USER/examples
varsim.py --vc_in_vcf All_20170710.vcf.gz --sv_insert_seq insert_seq.txt \
--sv_dgv GRCh37_hg19_supportingvariants_2013-07-23.txt --reference hs37d5.fa --id simu \
--read_length 100 --vc_num_snp 3000000 --vc_num_ins 100000 --vc_num_del 100000 \
--vc_num_mnp 50000 --vc_num_complex 50000 --sv_num_ins 2000 --sv_num_del 2000 \
--sv_num_dup 200 --sv_num_inv 1000 --sv_percent_novel 0.01 --vc_percent_novel 0.01 \
--mean_fragment_size 350 --sd_fragment_size 50 --vc_min_length_lim 0 --vc_max_length_lim 49 \
--sv_min_length_lim 50 --sv_max_length_lim 1000000 --nlanes 1 --total_coverage 1 \
--simulator_executable /usr/local/apps/art/20160605/bin/art_illumina \
--out_dir out --log_dir log --work_dir work --simulator art

Submit this job using the Slurm sbatch command.

sbatch --cpus-per-task=40 --mem=30g varsim.sh
Swarm of Jobs
A swarm of jobs is an easy way to submit set of independent commands requiring identical resources.

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

cd /data/$USER/dir1; varsim commands
cd /data/$USER/dir2; varsim commands
cd /data/$USER/dir3; varsim commands
cd /data/$USER/dir4; varsim commands

Submit this job using the swarm command.

swarm -f varsim.swarm -g 30 -t 40 --module varsim
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 varsim Loads the TEMPLATE module for each subjob in the swarm