Biowulf High Performance Computing at the NIH
iva on Biowulf

Integrated virus assembler (IVA) is a de novo assembler designed for virus genomes without repeat sequences, using Illumina read pairs from mixed populations at extremely high and variable depth.

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 built in test data set

[user@biowulf]$ sinteractive --cpus-per-task=2 --mem=6g
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 iva
[user@cn3144]$ iva --test --threads=2 --trimmomatic=$TRIMMOJAR test
unning iva in test mode...
Copied input test files into here: /data/user/iva/test
Current working directory: /data/user/iva/test
Running iva on the test data with the command:
/usr/local/apps/iva/1.0.2/bin/iva --threads 2 --pcr_primers hiv_pcr_primers.fa \
  --trimmomatic /usr/local/apps/trimmomatic/Trimmomatic-0.33/trimmomatic-0.33.jar \
  -f reads_1.fq.gz -r reads_2.fq.gz iva.out
Finished running iva
[user@cn3144]$ tree test
test
|-- [user    672]  hiv_pcr_primers.fa
|-- [user   9.7K]  iva_contigs_no_trimmomatic.fasta
|-- [user   9.0K]  iva_contigs_with_trimmomatic.fasta
|-- [user   4.0K]  iva.out
|   |-- [user    10K]  contigs.fasta
|   `-- [user    313]  info.txt
|-- [user   3.6M]  reads_1.fq.gz
|-- [user   4.4M]  reads_2.fq.gz
`-- [user   9.0K]  reference.fasta

Run IVA with trimmomatic on the data copied to test by the automated test

[user@cn3144]$ cd test
[user@cn3144]$ iva --threads 2 --pcr_primers hiv_pcr_primers.fa \
  -f reads_1.fq.gz -r reads_2.fq.gz \
  --trimmomatic $TRIMMOJAR \
  --ctg_first_trim 15 \
  iva.out2  

[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. iva.sh), which uses the input file 'iva.in'. For example:

#! /bin/bash

function fail {
  echo >2 "$@"
  exit 1
}

module load iva/1.0.2 || fail "could not load iva module"
iva --threads $SLURM_CPUS_PER_TASK \
  -f read1.fq.gz -r read2.fq.gz \
  --trimmomatic=$TRIMMOJAR \
  sample.iva || fail "iva return non-zero exit status"

Submit this job using the Slurm sbatch command.

sbatch --cpus-per-task=6 iva.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. iva.swarm). For example:

iva -r sample1_r1.fq.gz -f sample1_r2.fq.gz --trimmomatic=$TRIMMOJAR --threads $SLURM_CPUS_PER_TASK sample1_out
iva -r sample2_r1.fq.gz -f sample2_r2.fq.gz --trimmomatic=$TRIMMOJAR --threads $SLURM_CPUS_PER_TASK sample2_out
iva -r sample3_r1.fq.gz -f sample3_r2.fq.gz --trimmomatic=$TRIMMOJAR --threads $SLURM_CPUS_PER_TASK sample3_out

Submit this job using the swarm command.

swarm -f iva.swarm -g 10 -t 4 --module iva/1.0.3
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 iva Loads the iva module for each subjob in the swarm