NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LW-FQZip 2: a parallelized reference-based compression of FASTQ files

Zhi-an Huang, Zhenkun Wen, Qingjin Deng, Ying Chu, Yiwen Sun, Zexuan ZhuBMC Bioinformatics 2017 · DOI

Abstract

High-throughput DNA sequencing (HTS) generates massive volumes of data, primarily stored in FASTQ files, creating significant storage and transmission bottlenecks. LW-FQZip 2 is a lossless compression tool designed to address these challenges by employing a light-weight sequence mapping approach combined with advanced bitwise prediction and multi-threaded parallelism. Compared to its predecessor and other state-of-the-art tools, LW-FQZip 2 achieves superior compression ratios—particularly for long-read data—while offering improved flexibility and processing speed.

Introduction

The rapid advancement of genomic sequencing technologies has led to a data explosion. Modern high-throughput sequencing (HTS) platforms produce staggering amounts of raw data, typically formatted as FASTQ files. These files consist of three critical components: metadata headers, nucleotide sequences (ACGT bases), and quality scores representing the confidence of base calls.

The growth rate of genomic data currently exceeds the rate at which storage costs are declining, necessitating highly efficient compression solutions. While general-purpose compression tools like gzip are widely used, they are "biology-blind" and fail to exploit the inherent redundancies in DNA, such as repeats, palindromes, and similarities to reference genomes. Existing specialized genomic compressors often struggle with the variable lengths of "long-read" data from newer platforms or require computationally expensive external alignment software. LW-FQZip 2 addresses these limitations by providing a self-contained, parallelized, and reference-based compression framework.

Methods

LW-FQZip 2 introduces a "divide and conquer" strategy to improve coding efficiency and performance through parallelism. The compression workflow is divided into several distinct stages:

  1. Stream Splitting: The input FASTQ file is decomposed into three primary streams: metadata, nucleotide bases, and quality scores.
  2. Light-weight Mapping: To avoid the overhead of external aligners (e.g., BWA or Bowtie), LW-FQZip 2 utilizes an internal $k$-mer indexing strategy. It constructs a hash table of the reference genome and aligns reads against it. When a match is found, only the variances (differences) from the reference are stored, significantly reducing the space required for sequence data.
  3. Advanced Encoding:
  4. Metadata & Quality Scores: These streams undergo pre-processing using incremental and run-length-limited encoding to identify and compress repetitive patterns.
  5. PPM & Arithmetic Coding: The processed data is fed into a bitwise "Prediction by Partial Matching" (PPM) model (order-32) and an arithmetic coder. This high-order context model allows the algorithm to accurately predict subsequent bits, leading to higher compression density.
  6. Parallelism: Leveraging the Pthreads library, LW-FQZip 2 processes data blocks simultaneously across multiple CPU cores. This multi-threaded approach drastically reduces processing time compared to single-threaded implementations.
The workflow of LW-FQZip 2, illustrating the stream splitting, mapping, and parallel encoding processes.

Experimental Evaluation

The performance of LW-FQZip 2 was evaluated using ten real-world FASTQ datasets representing a diverse range of sequencing platforms and species:

  • Long-read data: Five datasets from PacBio RS, MinION, and 454GS platforms (ranging from 425 MB to 11 GB).
  • Short-read data: Five datasets from Illumina and Ion Torrent platforms (ranging from 641 MB to 202 GB). These datasets include genomic information from humans, E. coli, and various viruses, providing a robust test for the tool's versatility.

Results and Discussion

LW-FQZip 2 demonstrates significant improvements in both compression efficiency and operational robustness.

Compression Performance

In its optimized -g mode, LW-FQZip 2 consistently outperformed competitors such as CRAM, Quip, and DSRC 2. On specific long-read datasets, it achieved compression ratios as low as 11.7% of the original file size. A key factor in this success is the tool's ability to handle the "noisy" nature of quality scores using a high-order (order-32) context model, which identifies patterns that simpler compressors overlook.

Speed and Scalability

The integration of multi-threading allows LW-FQZip 2 to achieve much higher throughput than its predecessor. While reference-free tools (which do not perform alignment) can sometimes be faster, LW-FQZip 2 offers a superior "space-for-time" trade-off, making it ideal for long-term archival where storage density is paramount.

Comparison of compression and decompression speeds (MB/s) for LW-FQZip 2 against various reference-based, assembly-based, and reference-free tools.

Robustness and Data Integrity

Unlike several state-of-the-art tools (e.g., FQZcomp or LEON) that failed or experienced data fidelity issues when processing long-read data from platforms like PacBio or MinION, LW-FQZip 2 remained stable across all test cases. Furthermore, the tool preserves the original order of reads in the FASTQ file, ensuring compatibility with downstream analysis pipelines that rely on read ordering.

Conclusion

LW-FQZip 2 provides a powerful solution for the storage of massive genomic datasets. By integrating a light-weight mapping model, it eliminates the need for external alignment software, simplifying deployment. While the tool's primary strength lies in reference-based compression, it includes a "self-assembly" mode (-a) for cases where a reference genome is unavailable, albeit at a higher computational cost.

Future developments will focus on optimizing alignment models to better handle the high error rates characteristic of long-read sequencing and addressing disk I/O bottlenecks to further enhance parallel processing speeds.

Summary updated

BibTeX
@article{huang2017lw,
  author = {Zhi-an Huang and Zhenkun Wen and Qingjin Deng and Ying Chu and Yiwen Sun and Zexuan Zhu},
  title = {{LW-FQZip 2: a parallelized reference-based compression of FASTQ files}},
  journal = {BMC Bioinformatics},
  year = {2017},
  doi = {10.1186/s12859-017-1588-x},
}
Figure