Bioinformatics applications have a need for speed. For example, Next Generation Sequencing (NGS) platforms from Illumina and ThermoFisher/LifeTechnologies can generate massive datasets, requiring substantial computing horsepower for data analysis. CPU-based systems are often incapable of handling these datasets. Newer, highly-parallel GPU-based systems can provide the necessary compute power for NGS data analysis. However, traditional CPU-based bioinformatics algorithms must be ported to and optimized for execution on GPU’s. Enter nvBio – a new GPU-accelerated bioinformatics library developed by Nvidia for NGS and related Life Sciences applications.
nvBio is available as OpenSource software on Github. You’ll need a Nvidia GPU card at Compute Capability 3.5 or greater, which at the time of this writing includes the Kepler and Maxwell architectures. At the 2014 GTC Technology Conference, the nvBio software engineers presented an informative seminar and slideset about the library. If you want to be more engaged with library developments, you can join the Google group nvbio-users. Documentation is available for NVBIO. NVBIO is distributed under GPLv2 licensing so you’ll be able to copy, modify, and distribute it at will.
There are several requirements and dependencies necessary to install the library:
- CMake. You’ll need the CMake Cross Platform Makefile Generator to generate Makefiles and build executables. Using CMake is beyond the scope of this article but the CMake documentation should help you get started.
- Thrust. You’ll need the Thrust library, which is presently not included in the NVBIO requirements list, possibly an oversight by the developers. If you install a recent version of the CUDA Toolkit, it includes Thrust. CMake should be able to find the required Thrust include files assuming Thrust standalone libraries or CUDA Toolkit are properly installed.
- CUB libraries
- SAIS libraries
- zlib libraries. Usually included in Linux OS’s but you may want to install the most current version.
- CRC libraries
Hopefully, as NVBIO matures, it will include a more comprehensive package manager to better integrate all the dependencies.
NVBIO is designed as a GPU-enabled C++ framework including numerous template, utility, and primitive data structures and algorithms.
- Algorithms: Burrows-Wheeler Transform, FM-index, Smith-Waterman, Needleman-Wunsch, Gotoh, banded/full dynamic programming, branch and bound search, etc.
- Text indices & text search: FM-index, suffix tree, radix tree, sorted dictionary, exact string search, approximate string search, backtracking, etc.
- I/O: Sequence I/O, alignment I/O. Handled by the host CPU.
Based on the framework code, NVBIO includes several GPU-enabled applications:
- nvBowtie: parallel version of traditional Bowtie2 sequence alignment tool
- nvBWT: parallel version of Burrows-Wheeler Transform for reference indexing
- nvSetBWT: parallel version of Burrows-Wheeler Transform for read indexing
- nvSSA: a tool to build Sample Suffix Arrays
- nvFM-server: FM-index server
Multi-GPU capability was recently added to nvBowtie but expect single-GPU capability only for the rest of NVBIO. The library includes CPU-only as well as GPU implementations, thus giving you the option of running the library and applications on CPU’s only or on GPU’s. This could be useful for testing code and making performance comparisons.
A variety of NVBIO performance benchmarks are available. In the following examples NVBIO routines were run on Intel i7 3.2 Ghz CPU’s versus a single Nvidia K20 or K40 GPU. (Note that the new K80 GPU was recently announced, about 2X faster than K40).
In this benchmark, BWT-SW and Bowtie2 were compared to nvBWT on human reference genome build hg19. nvBWT was about 8X and 21X faster than BWT-SW and Bowtie2, respectively. The metric is time in “hh:mm:ss” format.
In this string search benchmark, both exact string match and approximate string match were run against hg19 with reads derived from the Sequence Read Archive. GPU-enabled exact and approximate matches were about 6X and 4X faster than CPU-only code, respectively. The metric is million queries per second.
In this benchmark, GPU-enabled Smith-Waterman code was compared to CPU-only code. GPU-enabled Edit Distance code was available but there were no comparable CPU reference metrics; the GPU results are shown anyway to get a sense of performance. K20 and K40 GPU models were tested, including the K40 in GPU-Boost mode, basically a form of overclocking. For Smith-Waterman the GPU-enabled code was about 3.5X, 4X, and 5X faster than CPU-only code. For Edit Distance the GPU-enabled code ran in the range 113 – 162 GCUPS. The metric is billion cell updates per second.
Considering that NVBIO is a new release product at version 0.9, these are impressive performance metrics. With continued software development, optimization, and multi-GPU capability we can expect the speedup to improve in future releases.
To demonstrate how to use NVBIO, the developers offer a sample pipeline for the nvBowtie short-read aligner. The pipeline data flow consists of several steps:
- Map. DNA or cDNA reads are split into short “seeds” and mapped against a reference genome using FM-index. Mapped seeds are stored as Suffix Array coordinates. Mapping options include both exact string matches and approximate matches.
- Locate. Suffix Array coordinates are converted to linear genomic coordinates.
- Select. Select mapped seeds for seed extension and new scoring rounds.
- Score. Score mapped extended seeds with respect to the reference genome.
- Reduce. Find best alignments of mapped extended seeds.
- Traceback. Perform Smith-Waterman traceback to generate optimal aligned sequences.
In a manner similar to the CPU-only version of Bowtie2, you can run the pipeline by first generating a BWT index of the reference genome and then execute the short-read alignment code. Suppose you have human reference genome build hg19 in FASTA format and a FASTQ reads dataset. Then run:
> nvBWT hg19.fasta hg19-index
> nvBowtie --file-ref hg19 reads.fastq reads.bam
to generate a BAM output file for further analysis.
We’ll keep track of NVBIO as it develops and provide update blogs as appropriate.