Fastq Read Quality Metrics
If you work with high throughput sequencing data, FASTQ files are your raw currency. The quality scores encoded in each read determine whether a variant call is reliable, whether an assembly is accurate, and whether a differential expression result is reproducible. This guide explains the core metrics used to evaluate FASTQ read quality, when to apply them, and how to avoid common pitfalls. It is written for bioinformatics trainees, laboratory scientists running their own sequencing, and experienced analysts who want a structured refresher. The National Center for Biotechnology Information provides authoritative background on the FASTQ format and its quality encoding through NCBI Bookshelf NCBI Bookshelf.
The first step in any sequencing analysis is quality assessment. A FASTQ file holds four lines per read: a sequence identifier, the nucleotide sequence, a separator line, and quality scores in Phred+33 or Phred+64 encoding. These scores represent the probability that a base call is incorrect, with higher scores indicating greater confidence. Understanding how to interpret these scores and the summary metrics derived from them is essential before any downstream work. The European Bioinformatics Institute offers free training materials that cover this foundation EMBL-EBI Training.
At a Glance
| Metric | What It Measures | Typical Threshold | Tool Example |
|---|---|---|---|
| Per base sequence quality | Average quality score at each position across all reads | Mean Q > 30 after position 10 | FastQC, MultiQC |
| Per sequence quality scores | Distribution of mean quality across reads | Fewer than 5% of reads with mean Q < 20 | FastQC, LongReadSum |
| Per base sequence content | Percentage of A, T, G, C at each position | Random variation within 5% of expected | FastQC |
| GC content | Overall GC percentage compared to theoretical distribution | Matches expected distribution for organism | FastQC, Galaxy tools |
| Sequence duplication levels | Fraction of reads with identical sequences | Low duplication for RNA-seq, higher acceptable for amplicon | FastQC, SAMStat 2 |
| Overrepresented sequences | Highly abundant sequences that may indicate contamination | None or only expected adapters | FastQC, NCBI SRA BLAST |
| N content | Percentage of uncalled bases per position | Should be near zero | FastQC |
| Read length distribution | Range and consistency of read lengths | Uniform for most Illumina, variable for PacBio/ONT | FastQC, LongReadSum |
| Kmer enrichment | Overrepresented short sequences | Should match expected or indicate adapters | FastQC, Kmer spectrum tools |
Core Concepts
FASTQ quality scores follow the formula Q = -10 log10(P), where P is the probability of a wrong base call. A Q score of 30 corresponds to a 1 in 1000 error rate (99.9% accuracy). A score of 20 means 1 in 100 errors (99% accuracy). Most Illumina data uses Phred+33 encoding, where the ASCII character offset is 33. Older Solexa data used Phred+64, but this is now rare. The Bioconductor project provides R packages like ShortRead that parse and summarize these scores rigorously Bioconductor.
Two key concepts are per base quality and per sequence quality. Per base quality reveals systematic problems such as decreasing quality at read ends, which often leads to trimming decisions. Per sequence quality identifies outlier reads that may arise from optical duplicates or sequencing errors. The Galaxy Training Network offers a step by step workflow for running FastQC on your data Galaxy Training Network.
Decision Points
When should you trust a quality metric and when should you dig deeper? Here are the critical decision points.
Context dependent thresholds. A Q20 threshold that works for Illumina short reads may not be appropriate for long reads from Oxford Nanopore (ONT), where raw quality scores are often lower. For ONT data, a median Q10 may be acceptable if downstream polishing corrects errors. The LongReadSum tool was developed specifically for long read quality control and handles these region specific patterns LongReadSum.
Duplication level interpretation. High duplication rates (over 20% of reads) can indicate PCR bias, but they can also be genuine for targeted amplicon sequencing or for single cell RNA-seq. Always compare to your expected library complexity. SAMStat 2 provides detailed duplication metrics per sample SAMStat 2.
Adapter content. If FastQC flags adapter sequences, it means the reads contain leftover adapters that should be trimmed. Do not ignore this flag. However, a low level of adapter presence at read ends (less than 1%) may be acceptable if your alignment tool is soft clipping aware. For paired end data, adapter overlap detection is also important.
GC bias. A GC content that deviates more than 5% from the expected value for your organism may indicate contamination, library bias, or a non random fragmentation method. For example, human whole genome data should be near 41% GC. If your sample shows 50% GC, suspect bacterial contamination. The NCBI Sequence Read Archive allows you to compare GC distributions across related experiments NCBI Sequence Read Archive.
Practical Workflow
Follow this sequence to evaluate FASTQ read quality systematically. The order matters because each step informs the next.
- Run a quality assessment tool. Use FastQC (single files) or MultiQC (many files) to generate HTML reports. For long reads, use LongReadSum. Review per base quality, per sequence quality, GC content, duplication levels, adapter content, and overrepresented sequences. Do not skip the per sequence quality distribution.
- Inspect per base quality box plots. Look for a consistent decrease in quality toward read ends. If the median quality drops below Q20 in the last 10 bases, plan to trim those bases. If quality is poor from the start, consider whether your sequencing run failed.
- Check adapter and overrepresented sequences. If adapters are found, run a trimmer like Trimmomatic or cutadapt. For Illumina TruSeq adapters, standard parameters will remove them. For novel adapters, you may need to supply the sequences manually.
- Assess duplication levels. For RNA-seq, duplication rates over 50% may indicate low library complexity or excessive PCR cycles. For DNA re sequencing, high duplication reduces effective coverage. Note that some duplication is expected from highly expressed genes in RNA-seq.
- Filter low quality reads or bases. Based on your thresholds, trim bases from read ends (e.g., crop first 10 bases if quality drops) and remove entire reads with mean quality below Q20. Paired end reads must be kept paired after filtering.
- Re run quality assessment on cleaned data. This confirms that trimming and filtering removed the problems. If adapter content persists, you may need a more aggressive trimming strategy.
- Use kmer spectrum analysis for contamination detection. Overrepresented kmers can indicate specific contaminants like mycoplasma or index hopping. This analysis is described in the related guide Kmer Spectrum Analysis. The zDUR compressor also embeds quality aware filtering and can flag outliers zDUR.
- Document decisions. Write down thresholds and trimming parameters for reproducibility. This is especially important for clinical pipelines, as described in a tuberculosis genomic pipeline validated to ISO standards Bringing tuberculosis genomics to the clinic.
Quality Checks
After you run your workflow, verify these specific checkpoints.
Check for unexpected base content. At the beginning of reads, you may see a slight bias due to random hexamer priming in RNA seq. This is normal and should not affect downstream analysis. But large deviations after the first few bases (over 10% difference) suggest a systematic error.
Check the per base N content. The percentage of N (uncalled bases) should be near zero at every position. If N content spikes, your sequencing chemistry may have failed for that cycle or your base caller made errors.
Check the sequence length distribution. For Illumina, all reads should have the same length. If you see a wide distribution, your trimming may have been too aggressive or your sequencing run had a flow cell issue. For PacBio and ONT, length variation is expected. SmartSim simulates smart seq3 single cell data with realistic length profiles smartSim.
Check for duplicate pairs in paired end data. If both reads of a pair are identical to another pair, that is a true PCR duplicate and may need removal for accurate variant calling. However, optical duplicates appear as identical read1 sequences but different read2 sequences. SAMStat 2 can differentiate these.
Verify that quality scores are in the correct encoding. FastQC automatically detects Phred+33 vs Phred+64, but you should confirm manually if you plan to write downstream parsers. The range of ASCII characters in a file tells you: Phred+33 uses characters from "!" (Q0) to "J" (Q41), Phred+64 uses "@" (Q0) to "h" (Q40).
Common Mistakes
Mistake 1: Applying the same quality thresholds to all sequencing types. Long reads and short reads require different thresholds. Using a Q30 cutoff on ONT data will discard most reads and reduce assembly quality. Instead, set a lower threshold (e.g., Q7) for ONT and use polishing software to correct errors after assembly.
Mistake 2: Ignoring the per sequence quality distribution. You might have excellent per base quality but still have a fraction of very poor reads. If you do not filter these, they can introduce false positives in variant calling. Always check the histogram of mean quality scores per read.
Mistake 3: Trimming adapters after aligning and deduplicating. Adapters should be removed before alignment. Aligners may not handle adapter sequences correctly, and deduplication will treat adapter containing reads as duplicates of different inserts.
Mistake 4: Over trimming. Trimming too many bases based on a slight quality dip can reduce mapping rates and effective coverage. Trim conservatively, for example, only remove bases where the median quality falls below Q20, not where the mean drops slightly.
Mistake 5: Assuming all overrepresented sequences are adapters. They could be ribosomal RNA, mitochondrial DNA, or true biological signal (e.g., rRNA in a total RNA library). Use BLAST to identify flagged sequences. The NCBI SRA can help you compare with known contaminants.
Mistake 6: Not checking for sample swaps or index hopping. Compare the GC content and duplication metrics across samples in a run. If one sample looks very different, it might be a different organism. The xenograft sorting method uses differences in read composition to assign reads to species Fast lightweight accurate xenograft sorting.
Limits of Interpretation
Quality metrics are summary statistics and do not capture every aspect of data quality. Even with perfect FASTQ scores, your data may suffer from batch effects, library preparation biases, or sequencing errors that are not reflected in Phred scores. The Phred score itself is an estimated probability and can be miscalibrated. For example, some Illumina runs produce overly optimistic scores, especially at high or low quality extremes. Two samples with identical FastQC reports may yield very different downstream results if they come from different tissues or extraction protocols.
The presence of adapters is not always easy to detect. Custom adapters or unique dual indices may not be recognized by FastQC. You should supply your adapter sequences to the trimming tool rather than rely on automated detection. Additionally, quality metrics cannot distinguish between genuine biological duplication (e.g., abundant transcripts) and technical duplication. You need to use a separate tool like Picard MarkDuplicates to infer whether duplicates are likely PCR artifacts.
For metagenomic or contaminated samples, individual read quality may be fine, but the overall mixture could distort interpretation. Always assess the kmer spectrum to detect unexpected organisms. The upper limit of interpretation is that quality metrics only describe the reads, not the reference genome, assembly, or alignment. A clean FASTQ file does not guarantee a clean alignment or a correct variant call.
Frequently Asked Questions
Q1: What is the difference between per base quality and per sequence quality? Per base quality shows the average Phred score at each position across all reads. It reveals positional biases such as quality degradation at read ends. Per sequence quality shows the distribution of mean Phred scores across individual reads, allowing you to identify a subpopulation of low quality reads that might be filtered out.
Q2: Why does my GC content look abnormal after quality trimming? Trimming can remove AT rich or GC rich regions if the trimming algorithm is not careful. For example, sliding window trimming may bias the remaining read content toward middle regions. Always compare the GC content of raw and trimmed data. If the trimmed GC differs by more than 3%, your trimming parameters may be too aggressive.
Q3: Can I use FASTQ quality metrics to compare different sequencing platforms? Yes, but with caution. Illumina quality scores are generally higher and more uniform than ONT scores. You cannot directly compare the numerical values. Instead, compare error rates after alignment, or use platform specific metrics like read length distribution and signal to noise ratio. LongReadSum provides tailored summaries for long reads.
Q4: My FastQC report shows a warning for per base sequence content. Is that always a problem? Not always. For RNA seq data, the first 12 bases often show bias due to random hexamer priming. This is expected and rarely affects mapping or quantification. For DNA seq, a uniform per base content is expected unless the library is heavily fragmented or biased. Check whether the deviation occurs only at the start or persists throughout.
References and Further Reading
- NCBI Bookshelf: FASTQ Format Overview
- EMBL-EBI Training: Quality Control of Sequencing Data
- Galaxy Training Network: Quality Control with FastQC and MultiQC
- Bioconductor: ShortRead Package for FASTQ Analysis
- NCBI Sequence Read Archive (SRA)
- LongReadSum: Long Read QC Summary Tool
- SAMStat 2: QC for Sequencing Data
- zDUR: Reference Free FASTQ Compressor with QC Features
- Fast Lightweight Accurate Xenograft Sorting
- Bringing Tuberculosis Genomics to the Clinic: ISO Accredited Pipeline