TL;DR
This paper benchmarks the performance of GATK3.8 and the newly released GATK4, focusing on computational speed and throughput for genomic variant calling. It reveals that while GATK4 is largely single-threaded, strategic optimizations like parallel garbage collection, asynchronous I/O, and data-level parallelization can significantly improve its performance, making it competitive with GATK3.8 for specific use cases.
What Problem Does This Paper Address?
The Genome Analysis Toolkit (GATK) is a cornerstone for genomic variant calling in research and clinical settings. However, the toolkit is constantly evolving, with significant updates like GATK3.8 (featuring Intel optimizations) and the complete rewrite of GATK4 (paving the way for Spark integration). This rapid evolution makes it challenging for users to stay abreast of performance changes and to optimally deploy the software in their workflows. The authors aim to provide a detailed performance analysis of GATK3.8 and GATK4, evaluating various optimization strategies to help users make informed decisions about which version and configuration best suits their needs, whether for maximizing speed in critical situations or throughput for large-scale studies.
Methods
The researchers conducted a comprehensive benchmarking study using GATK3.8 and GATK4. Their methodology involved evaluating several optimization techniques:
- Tool-level Threading: They measured the walltime for individual GATK tools (BaseRecalibrator, PrintReads/ApplyBQSR, HaplotypeCaller) across a range of thread counts to understand their scalability.
- Parallel Garbage Collection (PGC): They investigated the impact of enabling Java's parallel garbage collector on GATK4 tools, particularly MarkDuplicates and BaseRecalibrator, by varying the number of PGC threads.
- Asynchronous I/O: The study explored the effects of enabling asynchronous I/O for Samtools and Tribble (used for index files) in GATK4, testing different combinations of read/write settings.
- PairHMM Optimization: They examined the multithreaded implementation of the PairHMM algorithm within GATK4's HaplotypeCaller, leveraging Intel's Genomics Kernel Library (GKL) for AVX optimizations and OpenMP for multithreading.
- Data-level Parallelization (Chunking): The core of their performance optimization involved splitting the aligned BAM files into smaller chunks (by chromosome) and processing them in parallel. They tested both "within-node" (all chunks on one machine) and "across-node" (chunks distributed across multiple machines) parallelization strategies.
Datasets
The primary dataset used for evaluation was a whole genome sequencing (WGS) sample (NA12878) with approximately 20X depth. The reads were aligned using BWA MEM against the hg38 human reference genome and sorted with Novosort. For known sites, dbSNP build 146 was utilized. The paper does not introduce new benchmark datasets but rather uses a standard, well-characterized WGS sample for reproducible performance testing.
Key Insights and Ideas
- GATK4's Single-Threaded Nature: Despite being a rewrite, GATK4's core design for many tools is single-threaded, which initially seems counterintuitive for performance gains. However, this design choice facilitates easier integration with distributed computing frameworks like Spark.
- The Power of Optimization: The study demonstrates that even with a single-threaded core, GATK4 can achieve competitive or superior performance to GATK3.8 through careful application of optimizations like PGC, asynchronous I/O, and especially data-level parallelization.
- Chunking is King for Throughput: Splitting the genome into smaller chunks (especially by chromosome) is the most effective strategy for improving overall throughput, allowing many samples to be processed in parallel.
- Trade-offs Between Speed and Throughput: The paper clearly delineates that maximizing speed for a single sample often involves different strategies (e.g., GATK3.8 with across-node splitting) than maximizing throughput for many samples (e.g., GATK4 with within-node parallelization of multiple samples).
- Hardware Matters: The performance gains are highly dependent on the underlying hardware, particularly the number of cores and memory bandwidth.
Key Results
- GATK3.8 Thread Scalability: BaseRecalibrator and HaplotypeCaller showed a ~5-fold speedup with 16 threads but did not scale beyond that. PrintReads peaked around 3 threads and degraded at higher counts.
- GATK4 PGC Impact: PGC had minimal or negative impact on most GATK4 tools, except for MarkDuplicates (optimal with 2-4 PGC threads) and BaseRecalibrator (variable, but around 24 threads seemed optimal).
- Asynchronous I/O in GATK4: Enabling asynchronous I/O for Samtools reading/writing and disabling it for Tribble I/O provided the best walltime improvements for BaseRecalibrator and ApplyBQSR.
- PairHMM Optimization: GATK4 HaplotypeCaller achieved optimal performance with around 10 PairHMM threads.
- Data-Level Parallelization:
- For GATK3.8, within-node splitting beyond 3 chunks showed diminishing returns due to thread count degradation. Across-node splitting (3 chunks per node) significantly reduced walltime. Splitting into 12 chunks across 4 nodes resulted in a walltime of 3.4 hours.
- For GATK4, within-node splitting continued to improve walltime even down to 16 chunks.
- Overall Workflow Improvement: Optimized GATK3.8 workflow (MarkDuplicates → BaseRecalibrator → PrintReads → HaplotypeCaller) reduced walltime by 29.3% (21.7 to 15.3 hours). Optimized GATK4 workflow (MarkDuplicates → BaseRecalibrator → ApplyBQSR → HaplotypeCaller) reduced walltime by 16.9% (24.9 to 20.7 hours).
- Cost-Effectiveness: GATK3.8 with 12 chunks across 4 nodes achieved a speed of 3.4 hours at a cost of $41.60 per sample (on c5.18xlarge). GATK4 with 40 samples on a single node achieved a throughput of 1.18 samples per hour at a cost of $2.60 per sample.
Limitations and Future Work
- Hardware Specificity: The results are specific to the tested Skylake Xeon Gold 6148 hardware. Performance may vary on different architectures.
- GATK4 Beta Tools: The study focused on non-Spark implementations of GATK4 tools, as many Spark tools were still in beta at the time of release. Future work could explore the performance of Spark-enabled GATK4.
- Cost vs. Speed: The paper highlights the trade-off between speed and cost. While GATK3.8 can achieve faster individual run times through across-node splitting, GATK4 offers better throughput and cost-effectiveness for large-scale routine analyses.
- Future Work: The authors suggest that further optimization could be achieved by exploring Spark implementations of GATK4 and by fine-tuning parameters for specific hardware and dataset characteristics. The paper also implies that understanding the optimal configuration for different types of analyses (e.g., germline vs. somatic variant calling) would be valuable.
Summary updated