pilon on Biowulf

Pilon is a application to improve draft assemblies and find variation among strains, including large event detection.

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=4 --mem=4g
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 cn4224 are ready for job

[user@cn4224 ~]$ module load pilon
[+] Loading pilon  1.23 

[user@cn4224 ~]$ java -Xmx${SLURM_MEM_PER_NODE}m -jar $PILON_JAR --genome genome.fasta --frags frag.sorted.bam --ouput OUTPUT --vcf
Pilon version 1.23 Mon Dec 21 10:00:01 2020 -0600
[...]

[user@cn4224 ~]$ 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. pilon.sh) similar to the following.

#! /bin/bash

set -e

module load pilon

java -Xmx${SLURM_MEM_PER_NODE}m -jar ${PILON_JAR} --genome genome.fasta --frags frag.sorted.bam --ouput OUTPUT --vcf

Submit these jobs using the Slurm sbatch command.

Swarm of Jobs
A swarm of jobs is an easy way to submit a set of independent commands requiring identical resources.

Create a swarmfile for the first step of the pipeline (e.g. pilon.swarm). For example:

java -Xmx${SLURM_MEM_PER_NODE}m -jar ${PILON_JAR}  --genome genome.fasta --frags frag00.sorted.bam --ouput OUTPUT --vcf
java -Xmx${SLURM_MEM_PER_NODE}m -jar ${PILON_JAR}  --genome genome.fasta --frags frag02.sorted.bam --ouput OUTPUT --vcf
java -Xmx${SLURM_MEM_PER_NODE}m -jar ${PILON_JAR}  --genome genome.fasta --frags frag03.sorted.bam --ouput OUTPUT --vcf

Submit this job using the swarm command.

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