In bioinformatics, a quality control (QC) step can be applied at almost any stage of an analysis pipeline. However, the most common use of the term refers specifically to Sequencing QC: assessing the quality of raw reads produced by a next-generation sequencing (NGS) instrument before any downstream analysis.
Poor-quality data that is not caught at this stage propagates through the entire pipeline, leading to unreliable assemblies, incorrect variant calls, or misleading abundance estimates. QC is therefore not optional — it is the first analytical decision you make with your data.
FastQC is the standard tool for inspecting the quality of Illumina (and other short-read) FASTQ files. It produces an HTML report with a series of modules, each flagged green (pass), amber (warn), or red (fail). Key modules include:
For multiple samples, MultiQC aggregates individual FastQC reports into a single interactive summary, making it easy to compare quality across an entire sequencing run.
Illumina reads show a characteristic decline in quality towards the 3′ end of the read. This is caused by dephasing (loss of synchronisation between clusters) and signal accumulation as the sequencing cycle progresses. The effect is more pronounced in longer reads (e.g. 2×250 bp paired-end runs). In practice, the last ~10–20 bases of a read are often below Q30 and may need to be trimmed.
Oxford Nanopore Technology (ONT) reads have a fundamentally different quality profile:
When evaluating long-read data (or assemblies), the N50 is a key summary statistic for the length distribution of reads (or contigs).
N50 is the length L such that 50% of the total sequenced bases are contained in reads of length ≥ L.
Intuitively: sort all reads from longest to shortest and walk down the list summing their lengths. The length of the read at which you reach 50% of the total is the N50.
A higher N50 means longer reads, which generally leads to better assemblies. If your Nanopore run produces a low N50 (e.g. the majority of reads are <1 kb when you expected 10 kb fragments), it points to DNA degradation or a sub-optimal library preparation.
Beyond basic run-level QC, the nature of your experiment determines what additional checks are appropriate.
When sequencing a single bacterial isolate, you expect reads from one organism only. Useful checks include:
samtools coverage) reveals whether the library is adequate and whether
any genomic regions are missing.In metagenomic samples derived from clinical or environmental material (e.g. gut, respiratory tract, soil associated with plant roots), a significant fraction of reads may originate from the host rather than the microbial community of interest.
Host reads must be identified and removed before taxonomic profiling or assembly, as they:
We will explore host decontamination in detail in Week 5, using tools such as Bowtie2 or minimap2 to map reads against a host reference and discard those that align.
QC observations should lead to action. Once you have identified quality issues, you apply pre-processing steps that modify or filter the FASTQ files before downstream analysis. These steps are often referred to collectively as trimming or cleaning.
Common tools include:
During library preparation, adapter sequences are ligated to the ends of DNA fragments so that they can bind to the flow cell (Illumina) or are used for motor-protein loading (Nanopore). These synthetic sequences are not part of the sample genome and must be removed before alignment or assembly. Many aligners will tolerate a few adapter bases, but leaving long adapter tails causes misalignments and artefacts.
In amplicon sequencing workflows (e.g. 16S rRNA gene surveys, SARS-CoV-2 tiling amplicon sequencing), PCR primers are incorporated at the ends of reads. Because primers are synthetic and identical across all reads, leaving them in inflates coverage at primer sites and introduces bias in variant calling. Tools like Cutadapt and iVar are commonly used for primer trimming.
Very short reads (e.g. <50 bp for Illumina, <200 bp for Nanopore) often arise from over-fragmented DNA or adapter dimers. They typically align ambiguously to the reference genome and contribute little useful information. A minimum length filter discards them entirely.
Some reads have a globally low mean quality score, indicating that the entire read is unreliable (e.g. a pore in a poor state for Nanopore, or a cluster with imaging issues for Illumina). These can be removed by applying a minimum mean Q threshold (e.g. Q7 for Nanopore, Q20 for Illumina).
Rather than discarding entire reads, quality trimming removes only the low-quality bases from the
ends of reads while retaining the usable portion. The most common algorithm is a sliding-window
approach: scan from the 3′ end and cut once the mean quality in a window (e.g. 4 bases) drops below
a threshold (e.g. Q20). Trimmomatic’s SLIDINGWINDOW:4:20 option implements this directly.
Note: aggressive trimming can do more harm than good. Removing too many bases reduces the information available for assembly or alignment. Modern aligners (e.g.
bwa-mem2,minimap2) perform soft-clipping — they effectively ignore low-quality ends during alignment without physically removing bases from the file. For many workflows, adapter removal is sufficient and quality trimming is optional.
After pre-processing, it is good practice to run FastQC (and MultiQC) again on the cleaned reads to confirm that the issues have been resolved before proceeding to alignment or assembly.