Biowulf High Performance Computing at the NIH
Graphmap on Biowulf

GraphMap is a novel mapper targeted at aligning long, error-prone third-generation sequencing data.
It is designed to handle Oxford Nanopore MinION 1d and 2d reads with very high sensitivity and accuracy, and also presents a significant improvement over the state-of-the-art for PacBio read mappers.

Publication

https://www.nature.com/articles/ncomms11307

Documentation

https://github.com/isovic/graphmap

Notes

Module Name: graphmap (see the modules page for more information)

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
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 graphmap
[user@cn3144 ~]$ graphmap align -r reference.fa -d reads.fasta -o output.sam
[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. graphmap.sh). For example:

#!/bin/bash
set -e
module load graphmap
graphmap align -t $SLURM_CPUS_PER_TASK -r reference.fa -d reads.fasta -o output.sam

Submit this job using the Slurm sbatch command.

sbatch [--mem=#] [--cpus-per-task=#] graphmap.sh

Where memory can be 10 if require 10gb.

Cpus-per-task can be 4 if requires 4 CPUs and the '$SLURM_CPUS_PER_TASK' in the script will be automatically replaced accordingly.

 

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. graphmap.swarm). For example:

cd dir1; graphmap align -t $SLURM_CPUS_PER_TASK -r reference.fa -d reads.fasta -o output.sam
cd dir2; graphmap align -t $SLURM_CPUS_PER_TASK -r reference.fa -d reads.fasta -o output.sam
cd dir3; graphmap align -t $SLURM_CPUS_PER_TASK -r reference.fa -d reads.fasta -o output.sam

Submit this job using the swarm command.

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