Biowulf High Performance Computing at the NIH
TMAP on Biowulf

TMAP is a fast and accurate alignment software for short and long nucleotide sequences produced by Ion Torrent sequencing technologies.

Documentation
Important Notes

NOTE: By default, tmap will attempt to use ALL CPUS ON THE HOST. Please indicate the number of threads with the -n or --num-threads option.

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 --cpus-per-task=8 --mem=20g
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 TMAP
[user@cn3144 ~]$ tmap mapall -n $SLURM_CPUS_PER_TASK -f /path/to/reference/file.fasta -r input.bam -v -Y -u --prefix-exclude 5 -o 2 stage1 map4 > output.bam 2>logfile.out

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

#!/bin/bash
module load TMAP
tmap mapall -n $SLURM_CPUS_PER_TASK -f /path/to/reference/file.fasta -r input.bam -v -Y -u --prefix-exclude 5 -o 2 stage1 map4 > output.bam 2>logfile.out

Submit this job using the Slurm sbatch command.

sbatch --cpus-per-task=16 --mem=20g TMAP.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. TMAP.swarm). For example:

tmap mapall -n $SLURM_CPUS_PER_TASK -f /path/to/reference/file.fasta -r input.bam -v -Y -u --prefix-exclude 5 -o 2 stage1 map4 > output1.bam 2>logfile1.out
tmap mapall -n $SLURM_CPUS_PER_TASK -f /path/to/reference/file.fasta -r input.bam -v -Y -u --prefix-exclude 5 -o 2 stage1 map4 > output2.bam 2>logfile2.out
tmap mapall -n $SLURM_CPUS_PER_TASK -f /path/to/reference/file.fasta -r input.bam -v -Y -u --prefix-exclude 5 -o 2 stage1 map4 > output3.bam 2>logfile3.out
tmap mapall -n $SLURM_CPUS_PER_TASK -f /path/to/reference/file.fasta -r input.bam -v -Y -u --prefix-exclude 5 -o 2 stage1 map4 > output4.bam 2>logfile4.out

Submit this job using the swarm command.

swarm -f TMAP.swarm -g 20 -t 12 --module TMAP
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 TMAP Loads the TMAP module for each subjob in the swarm