BamTools¶
BamTools provides both a programmer's API and an end-user's toolkit for handling BAM files.
BamTools is available as a module on Apocrita.
Usage¶
To run the default installed version of BamTools, simply load the
bamtools module:
$ module load bamtools
$ bamtools --help
usage: bamtools [--help] COMMAND [ARGS]
Available bamtools commands:
convert
count
coverage
filter
header
index
merge
random
resolve
revert
sort
split
stats
See 'bamtools help COMMAND' for more information on a specific command.
For more information regarding each analysis pipeline, pass the --help
switch after the pipeline sub-command (i.e. bamtools convert --help).
Example job¶
Serial job¶
Here is an example job running on 1 core and 4GB of memory to convert a bam
file to a fastq file:
#!/bin/bash
#SBATCH -n 1 # (or --ntasks=1) Request 1 core
#SBATCH --mem-per-cpu=4G # Request 4GB RAM per core
#SBATCH -t 1:0:0 # Request 1 hour runtime
module load bamtools
bamtools convert -format fastq \
-in input_alignments.bam \
-out output_reads.fastq