Quality Control with FastQC and MultiQC

  • Quality control is an essential stage of bioinformatics analysis because the reliability of downstream results depends on the quality of the input biological data. In high-throughput sequencing, raw reads may contain low-quality bases, adapter contamination, abnormal nucleotide composition, ambiguous bases, duplicated sequences, and other technical artifacts. These problems can affect sequence alignment, genome assembly, variant detection, gene expression analysis, and metagenomic classification. FastQC and MultiQC are two widely used tools for evaluating sequencing data quality and summarizing quality-control results. FastQC examines individual sequencing files and generates detailed reports, while MultiQC collects reports from multiple samples and analysis tools into a consolidated overview.
  • FastQC is an open-source quality-control program designed primarily for high-throughput sequencing data. It is commonly used to assess FASTQ files generated by Illumina and other sequencing platforms. FastQC examines several characteristics of sequencing reads, including per-base sequence quality, per-sequence quality scores, sequence length distribution, nucleotide composition, GC content, sequence duplication levels, overrepresented sequences, and adapter content. Its reports help researchers identify potential problems before performing downstream analyses.
  • FastQC is particularly useful because it provides a standardized set of quality-control modules and visual summaries. Each module examines a different aspect of the sequencing data and produces a result classified as pass, warning, or fail. A pass indicates that the observed metric is within the program’s expected range, a warning indicates a potentially unusual pattern, and a fail indicates a result that falls outside the expected range. These indicators are screening signals rather than universal judgments of data quality. A warning or failure does not automatically mean that a dataset is unsuitable for analysis, because some biological samples and library preparation methods naturally produce unusual quality profiles.
  • The per-base sequence quality module examines the distribution of Phred quality scores at each position along the reads. Phred scores describe the estimated probability that a base call is incorrect. The relationship is expressed as:

[
Q = -10\log_{10}(P)
]

  • where (Q) is the Phred quality score and (P) is the probability of an incorrect base call. A higher Phred score indicates greater confidence in the base call. For example, Q20 corresponds to an estimated error probability of 1%, while Q30 corresponds to an error probability of 0.1%. FastQC displays quality-score distributions across read positions, allowing researchers to identify declining quality toward the ends of reads or unusual variations between sequencing cycles.
  • The per-sequence quality scores module evaluates the distribution of average quality scores across complete reads. A large concentration of reads with low average quality may indicate poor sequencing performance, sample degradation, or problems during library preparation. The per-base quality module and per-sequence quality module provide complementary information: one examines quality at individual read positions, while the other summarizes quality across complete reads.
  • The per-base sequence content module examines the proportion of adenine, thymine, guanine, and cytosine at each read position. In many randomly fragmented genomic libraries, nucleotide composition is expected to be relatively stable across read positions, although biological and technical factors can produce deviations. Strong differences between nucleotide frequencies may indicate sequence-specific biases, primer effects, adapter contamination, or other library preparation artifacts. However, non-random composition is not always a problem. Amplicon sequencing, RNA sequencing, targeted sequencing, and some small RNA libraries may naturally show position-specific nucleotide patterns.
  • The per-sequence GC content module evaluates the distribution of GC percentages across individual reads and compares it with an expected distribution. An unusual or multimodal GC distribution may indicate contamination, mixed organisms, sample heterogeneity, or library bias. However, the expected GC distribution depends on the organism and sequencing experiment. Metagenomic samples may naturally contain organisms with different genomic GC contents, producing multiple peaks. Researchers should therefore interpret GC profiles using biological knowledge and appropriate reference information.
  • The sequence length distribution module examines the lengths of reads in a sequencing dataset. Uniform read lengths are common in many short-read sequencing workflows, while variable lengths may occur after quality trimming, adapter removal, or in some sequencing technologies. A large number of unexpectedly short reads may indicate excessive trimming, adapter read-through, or poor library preparation. Long-read sequencing datasets naturally contain a broader range of read lengths, so their length distributions should be interpreted differently from those of conventional short-read datasets.
  • The sequence duplication levels module examines how frequently identical sequences occur within the dataset. High duplication may indicate PCR amplification, limited library complexity, or extensive sequencing of a restricted molecular pool. However, naturally abundant sequences, highly expressed transcripts, targeted amplicons, and low-diversity libraries may also produce high duplication levels. FastQC estimates duplication using sequence-level comparisons and should not be treated as a definitive method for identifying PCR duplicates in aligned genomic data. Tools such as Picard MarkDuplicates and SAMtools markdup provide alignment-based duplicate identification, while UMI-based methods can provide more direct molecular information when unique molecular identifiers are available.
  • The overrepresented sequences module identifies sequences that occur more frequently than expected. These sequences may represent adapter contamination, primer sequences, ribosomal RNA, highly abundant transcripts, or other biological and technical features. FastQC can compare detected sequences against its built-in adapter and contaminant lists, but not every overrepresented sequence can be identified automatically. Researchers may need to compare suspicious sequences against external databases using tools such as BLAST or specialized contaminant reference collections.
  • The adapter content module examines whether known sequencing adapter sequences are present in the reads. Adapter contamination can occur when DNA fragments are shorter than the sequencing read length, allowing the instrument to sequence into the adapter region. Adapter sequences can interfere with alignment and assembly and should generally be removed when detected. Tools such as Cutadapt, fastp, and Trimmomatic can perform adapter trimming. The correct adapter sequence should be selected according to the library preparation protocol rather than assuming that one adapter applies to every sequencing experiment.
  • The following command illustrates how to run FastQC on a pair of compressed FASTQ files:

fastqc sample_R1.fastq.gz sample_R2.fastq.gz -o fastqc_results/

  • The -o option specifies the output directory. FastQC generates an HTML report for each input file and a corresponding compressed data file containing the numerical results. The HTML report can be opened in a web browser to inspect the quality-control plots and module summaries.
  • FastQC can also process multiple sequencing files in one command:

fastqc *.fastq.gz -o fastqc_results/ –threads 8

  • The –threads option controls the number of processing threads. When analyzing a large number of files, researchers should allocate sufficient memory and computational resources and avoid using more threads than the available system can support.
  • FastQC can be installed through several methods, including Conda and direct software distribution. A Conda-based installation can be performed using:

conda create -n sequencing-qc -c bioconda -c conda-forge fastqc multiqc

conda activate sequencing-qc

  • After installation, the program versions can be checked using:

fastqc –version

multiqc –version

  • MultiQC is an open-source reporting tool that aggregates quality-control results from multiple samples and bioinformatics programs into a single interactive HTML report. While FastQC examines individual sequencing files, MultiQC collects the resulting reports and summarizes them across an entire sequencing project. It can also parse outputs from many other bioinformatics tools, including fastp, Cutadapt, STAR, HISAT2, Bowtie2, SAMtools, Picard, and several other commonly used programs.
  • MultiQC is especially useful when a study contains many samples, sequencing lanes, or experimental groups. Instead of opening hundreds of individual FastQC reports, researchers can examine a consolidated report showing the quality characteristics of all available samples. This makes it easier to identify outliers, compare sequencing batches, detect systematic problems, and evaluate the consistency of library preparation and sequencing performance.
  • MultiQC automatically searches a specified directory and its subdirectories for recognized quality-control reports. It extracts relevant information and generates an interactive HTML report containing summary tables, plots, and sections for individual tools. Depending on the available input reports, the output may include per-base quality, GC content, read counts, duplication metrics, adapter content, mapping statistics, alignment rates, and other measurements.
  • The following command generates a MultiQC report from FastQC output:

multiqc fastqc_results/ -o multiqc_results/

  • The output directory contains an HTML report that can be opened in a web browser. MultiQC can also analyze a directory containing results from several tools:

multiqc analysis_results/ -o multiqc_report/

  • The resulting report may combine FastQC, fastp, Cutadapt, alignment, and other recognized quality-control outputs. MultiQC does not perform adapter trimming, read filtering, alignment, or contamination removal itself. It summarizes reports produced by other programs and helps researchers interpret their combined results.
  • One of the major advantages of MultiQC is the ability to compare quality metrics across samples. For example, if most samples show high per-base quality but one sample has a substantial decline toward the end of reads, the problematic sample can be identified quickly. Similarly, if one sample has an unusually high adapter content, duplication rate, or GC deviation, it can be investigated before downstream analysis. MultiQC can also reveal batch effects, such as systematic differences between sequencing runs or library preparation groups.
  • A typical quality-control workflow begins with raw FASTQ files. FastQC is first used to assess the original sequencing data. If the reports indicate adapter contamination, low-quality bases, or other correctable problems, preprocessing tools such as fastp or Cutadapt can be applied. FastQC is then run again on the processed reads to evaluate whether the preprocessing steps improved the data. MultiQC combines the reports generated before and after preprocessing, allowing researchers to compare the overall quality of the dataset.
  • The following example demonstrates a basic workflow using FastQC, fastp, and MultiQC for paired-end sequencing data:

# Create output directories

mkdir -p qc_before trimmed qc_after multiqc_report

# Assess raw sequencing reads

fastqc sample_R1.fastq.gz sample_R2.fastq.gz \

  –outdir qc_before/

# Remove adapters and low-quality bases

fastp \

  -i sample_R1.fastq.gz \

  -I sample_R2.fastq.gz \

  -o trimmed/sample_R1.trimmed.fastq.gz \

  -O trimmed/sample_R2.trimmed.fastq.gz \

  –detect_adapter_for_pe \

  –qualified_quality_phred 20 \

  –length_required 50 \

  –thread 8 \

  –html trimmed/fastp_report.html \

  –json trimmed/fastp_report.json

# Assess processed reads

fastqc trimmed/sample_R1.trimmed.fastq.gz \

  trimmed/sample_R2.trimmed.fastq.gz \

  –outdir qc_after/

# Combine quality-control reports

multiqc qc_before/ trimmed/ qc_after/ \

  –outdir multiqc_report/

  • The workflow produces quality-control reports for the original and processed reads, together with a consolidated MultiQC report. The fastp parameters shown are illustrative and should be adjusted according to the sequencing technology, read quality, library preparation, and biological objectives. A minimum read length of 50 bases, for example, may be appropriate for some workflows but unsuitable for others.
  • FastQC and MultiQC are primarily quality-assessment and reporting tools. They do not determine automatically whether every dataset is suitable for a particular analysis, nor do their warning and failure indicators replace expert interpretation. Some sequencing libraries naturally have biased nucleotide composition, high duplication, or unusual GC distributions. Amplicon sequencing, small RNA sequencing, targeted sequencing, single-cell sequencing, and metagenomic experiments may show patterns that differ from conventional whole-genome sequencing libraries. The biological context and library preparation method should therefore guide the interpretation of quality-control results.
  • Quality-control assessment also differs across sequencing technologies. Short-read datasets commonly require examination of per-base quality, adapter contamination, read length, and base composition. Long-read sequencing requires additional attention to read-length distribution, basecalling quality, yield, and platform-specific error patterns. Tools such as NanoPlot and NanoStat are commonly used for Oxford Nanopore sequencing quality assessment, while PacBio workflows can use SMRT Link and related tools. MultiQC can aggregate outputs from several supported tools, providing a more comprehensive view of sequencing quality across different data types.
  • FastQC and MultiQC can also be integrated into automated bioinformatics pipelines. Workflow management systems such as Snakemake and Nextflow can run quality assessment, trimming, alignment, and report generation in a standardized manner across multiple samples. Automated workflows reduce repetitive manual work and help maintain consistency between sequencing projects. They also support reproducibility by recording software versions, input files, parameters, and intermediate outputs.
  • For reproducible research, the original FASTQ files, FastQC reports, MultiQC reports, preprocessing parameters, software versions, and reference information should be preserved. Researchers should record whether quality control was performed before or after trimming and filtering and document the reasons for removing reads or changing preprocessing parameters. The number of raw and retained reads should also be reported so that downstream results can be interpreted in relation to the amount of sequencing data used.
  • FastQC and MultiQC are fundamental tools in sequencing quality control because they provide complementary levels of assessment. FastQC identifies quality characteristics and potential problems in individual sequencing files, while MultiQC combines reports from multiple samples and tools into a consolidated project-level summary. Together, they help researchers detect technical problems, compare sequencing batches, assess preprocessing effectiveness, and prepare reliable datasets for downstream bioinformatics analysis.
Author:

Leave a Reply

Your email address will not be published. Required fields are marked *