Working With BBMap¶
BBMap is a short read aligner. We tested several aligners and found BBMap the most accurate and sensitive. It’s also relatively fast, and happens to be easy to work with as well.
Installing BBMap¶
First, ensure that you have Java 7 installed.
Download BBMap and extract it to a location of your choice:
# Pick the location for install:
cd $HOME
# Extract BBMap (extracts to directory 'bbmap')
tar xzf BBMap_XX.XX.tar.gz
Add it to your PATH:
export PATH=$PATH:$HOME/bbmap
On Mac OS X, you’ll also need to set JAVA_HOME:
export JAVA_HOME=`/usr/libexec/java_home`
Note that BBMap requires Java 7.
Building BBMap Databases¶
Building a BBMap database is relatively straightforward.
Download a genome or annotation FASTA file.
- For example, Ensembl provides the zebrafish genome.
- For example, mirBase provides a miRNA hairpin annotation FASTA file.
Unzip the zipped FASTA file. This can sometimes be accomplished by simply double clicking on the zipped filename. This can also be accomplished via a terminal window with the following command:
gunzip Danio_rerio.GRCz10.dna.toplevel.fa.gz
Create the BBMap database. Though there are several ways to do this, the following approach is known to work with this demo:
bbmap.sh k=7 path=BBMap/Danio_rerio.GRCz10.dna.toplevel \ ref=Danio_rerio.GRCz10.dna.toplevel.fa.gz
This may take several minutes depending on your hardware.
BBMap Memory Requirements¶
BBMap uses a fair amount of memory. While it should run fine on any modern compute node, some laptops and desktops may not have sufficient memory resources to load an entire reference genome database into BBMap.