SeqWho: Reliable, rapid determination of sequence file identity using k -mer frequencies

Christopher Bennett, Micah Thornton, Chanhee Park, Gervaise H. Henry, Yun Zhang, Venkat S. Malladi, Dae‐Hwan KimbioRxiv 2021

TL;DR

SeqWho is a new, fast, and accurate tool that uses k-mer frequencies to identify the species and sequencing technology of biological data files. It addresses the critical need for reliable metadata in the ever-growing public sequencing data repositories, achieving over 97% accuracy in high-confidence calls.

What Problem Does This Paper Address?

The explosion of sequencing technologies has led to a massive increase in publicly available biological data. While these datasets are invaluable for research, they often come with metadata (like the organism or sequencing protocol used) that isn't always systematically verified. This can lead to inconsistencies and errors, negatively impacting the integrity and usability of future studies. Existing methods for verifying this metadata can be slow, computationally intensive, or rely on manual checks, making them impractical for large-scale data analysis.

Methods

SeqWho employs an alignment-free approach using k-mer frequencies and a Random Forest classifier. Here's a breakdown of the key techniques:

  • K-mer Frequency Analysis: The core idea is that different species and sequencing technologies leave distinct "fingerprints" in the frequency of short DNA sequences (k-mers). SeqWho analyzes the frequencies of 1-5 base pair k-mers.
  • Repeat K-mer Incorporation: To enhance accuracy, SeqWho also incorporates information from highly conserved, repetitive DNA elements (31-mers) identified using HISAT2. These repeat regions are known to be biased by species and genome location, making them useful for classification.
  • Random Forest Classification: A Random Forest model is trained on these k-mer frequency and repeat k-mer features. This ensemble learning method combines multiple decision trees to make robust predictions. SeqWho uses 13 different Random Forest models for various classification tasks (species, technology, or combined).
  • Heuristic Quality Assessment: Beyond identification, SeqWho also provides quality metrics similar to FASTQC, including %GC content, average read quality, and adapter content, but does so much faster.

Datasets

  • Training Data: The model was trained on a dataset of 16,485 FASTQ(A) files. These files were downloaded from the Sequence Read Archive (SRA) and included data from two species (Human and Mouse) across nine different sequencing types (Amplicon-seq, ATAC-seq, Bisulfite-seq, ChIP-seq, DNase-seq, miRNA-seq, RNA-seq, Whole Genome Sequencing (WGS), and Whole Exome Sequencing (WES)).
  • Validation Data: The trained model was validated on 1,665 novel files, approximately 100 for each species and sequencing type combination.
  • Mixed Data Stress Test: Additional tests were performed on synthetic and real mixtures of human, mouse, RNA-seq, and ChIP-seq data to evaluate performance on complex or contaminated samples.

Key Insights and Ideas

  • K-mer Biases are Powerful Classifiers: The study demonstrates that subtle biases in k-mer frequencies, even from short sequences and repetitive regions, are highly informative for distinguishing between species and sequencing technologies.
  • Speed vs. Accuracy Trade-off is Solvable: SeqWho achieves high accuracy (over 97% for high-confidence calls) while being significantly faster than existing tools like FASTQC, by intelligently subsampling reads and focusing on informative k-mers.
  • Repeat Regions Offer Valuable Clues: Incorporating information from repeat elements, often overlooked in basic k-mer analysis, significantly boosts classification accuracy.
  • Metadata Verification is Crucial and Achievable: The paper highlights the persistent problem of unreliable metadata in public repositories and presents a practical solution that can be integrated into existing bioinformatics pipelines.

Key Results

  • High Accuracy: SeqWho achieves >98% accuracy for species identification, >97% for sequencing technology, and >96% for combined classification in high-confidence calls.
  • Speed: SeqWho runs in approximately 20 seconds per file, which is about 200 times faster than FASTQC.
  • Efficiency: The runtime is independent of input file size due to subsampling.
  • Quality Metrics: SeqWho provides quality metrics comparable to FASTQC but much faster.
  • Robustness: The tool performs well even on mixed or contaminated samples, often defaulting to the dominant species or technology present.

Limitations and Future Work

  • Human Amplicon vs. Mouse Amplicon: The paper notes that classifying human amplicon versus mouse amplicon data is the most challenging, with around 22% misclassification. This is attributed to the high variability of amplified regions.
  • RNA-seq Ambiguity: Some ambiguity was observed in RNA-seq classification, potentially due to conserved coding sequences between species.
  • Adapter Detection: SeqWho's current adapter detection is described as "naïve" and was not able to detect adapters in the tested files, possibly due to stringent cutoffs or focusing on the end nucleotides.
  • Future Work: The authors plan to improve classification algorithms to achieve >99% accuracy and further enhance the heuristic determination of quality information. They also aim to explore drawing more valuable information from k-mer frequencies and repeat information for future applications.

Summary updated

Abstract

Abstract With the vast improvements in sequencing technologies and increased number of protocols, sequencing is finding more applications to answer complex biological problems. Thus, the amount of publicly available sequencing data has tremendously increased in repositories such as SRA, EGA, and ENCODE. With any large online database, there is a critical need to accurately document study metadata, such as the source protocol and organism. In some cases, this metadata may not be systematically verified by the hosting sites and may result in a negative influence on future studies. Here we present SeqWho, a program designed to heuristically assess the quality of sequencing files and reliably classify the organism and protocol type. This is done in an alignment-free algorithm that leverages a Random Forest classifier to learn from native biases in k -mer frequencies and repeat sequence identities between different sequencing technologies and species. Here, we show that our method can accurately and rapidly distinguish between human and mouse, nine different sequencing technologies, and both together, 98.32%, 97.86%, and 96.38% of the time in high confidence calls respectively. This demonstrates that SeqWho is a powerful method for reliably checking the identity of the sequencing files used in any pipeline and illustrates the program’s ability to leverage k -mer biases.
BibTeX
@misc{bennett2021seqwho,
  author = {Christopher Bennett and Micah Thornton and Chanhee Park and Gervaise H. Henry and Yun Zhang and Venkat S. Malladi and Dae‐Hwan Kim},
  title = {{SeqWho: Reliable, rapid determination of sequence file identity using <i>k</i> -mer frequencies}},
  year = {2021},
  doi = {10.1101/2021.03.10.434827},
  howpublished = {bioRxiv},
}
Figure