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.


Evaluating the quality of a sequencing run

FastQC

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:

  • Per-base sequence quality — a box plot of Phred quality scores along the read length.
  • Per-sequence quality scores — distribution of mean quality scores per read.
  • Per-base sequence content — nucleotide composition per position (useful for detecting adapter or primer bias).
  • Sequence duplication levels — high duplication can indicate low-complexity libraries or over-amplification.
  • Overrepresented sequences — flags adapter sequences, rRNA, or other contaminants.
  • Adapter content — explicitly checks for the presence of common adapter sequences.

For multiple samples, MultiQC aggregates individual FastQC reports into a single interactive summary, making it easy to compare quality across an entire sequencing run.

Quality profiles: Illumina vs. Nanopore

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:

  • Raw accuracy per base is lower than Illumina (Q10–Q20 for older chemistry; Q20+ for recent R10.4.1 / Kit 14 chemistry with duplex).
  • Quality does not consistently degrade along the read in the same way as Illumina.
  • The most informative QC metric for Nanopore data is the read-length distribution, because nanopore sequencing is not inherently limited by read length — very short reads often indicate DNA fragmentation during library preparation.

What is N50?

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.


Application-specific QC

Beyond basic run-level QC, the nature of your experiment determines what additional checks are appropriate.

Bacterial isolate sequencing

When sequencing a single bacterial isolate, you expect reads from one organism only. Useful checks include:

  • Species confirmation — tools like Kraken2 or Mash can quickly profile the taxonomic content of your reads. A significant proportion of reads mapping to unexpected organisms indicates contamination.
  • Genome coverage and completeness — mapping reads to a reference genome and calculating depth of coverage (e.g. with samtools coverage) reveals whether the library is adequate and whether any genomic regions are missing.
  • MLST / species ID — tools like mlst can assign a sequence type directly from raw reads.

Metagenomics: host contamination

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:

  • Inflate the apparent proportion of non-microbial reads.
  • Consume compute resources during assembly.
  • Potentially expose sensitive human data.

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.


Reads pre-processing

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:

Adapter removal

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.

Primer removal

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.

Discarding short reads

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.

Discarding low-quality reads

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).

Trimming low-quality regions

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.


Previous submodule:
Next submodule: