Skip to content

Quality Control of NGS Reads with FastQC and MultiQC

By Bio Help Learning35 min readUpdated FREE

Chapter 5 of 5: Practice, FAQ and references

Practice exercise

Run the full workflow on a paired-end dataset of your choice. Then answer: (1) Which modules warned or failed on the raw reads? (2) Which improved after trimming? (3) Which warnings are expected for your type of data, and why? (4) What percentage of reads did fastp remove, and is that acceptable?

SolutionSign in free to see the solution. No payment needed.Sign in / Create free account
Study material

Complete study material

  • DATATutorial dataset: 100,000 paired-end reads, ready to use (30 MB)
  • DATAScripts: one-sample and many-sample workflows, conda environment, quality decoder
  • IPYNBGoogle Colab notebook: the whole tutorial, run in your browser
  • PDFSlides: all diagrams and tables (PDF, 16 slides)
  • PDFSolution with reference results, plots and answers (PDF)
  • Every file above, yours to keep
  • Notebooks open in Google Colab (free)
  • Certificate with QR verification after your project report is approved

FastQC tutorial: frequently asked questions

Should I always trim my reads?

Trim adapters whenever FastQC shows them. Quality trimming is helpful for variant calling and assembly. Modern RNA-seq aligners such as STAR soft-clip poor read ends themselves, so light trimming (or adapter trimming only) is usually enough for gene expression.

Should I remove duplicate reads at this stage?

No. Duplicates are handled after alignment (for example with Picard MarkDuplicates for DNA), and in RNA-seq they are usually kept.

Is FastQC enough, or do I need fastp too?

FastQC only reports; it changes nothing. fastp both cleans the reads and reports. Running FastQC before and after fastp gives you an independent check.

Can I use Trimmomatic or Cutadapt instead of fastp?

Yes. All three remove adapters and low-quality bases. fastp is fast, needs no adapter file for paired-end data and writes a report MultiQC can read, which is why we use it here.

What should I write in my Methods section?

Report tool versions, non-default settings and your QC decisions. A template you can adapt:

Raw read quality was assessed with FastQC v0.12.1. Adapters and low-quality 3′ bases were removed with fastp v0.23.4 (automatic adapter detection for paired-end data, 3′ sliding-window trimming with a 4-bp window and mean quality 20, minimum read length 36 bp). Reports were combined with MultiQC v1.25. Samples were retained if [your acceptance criteria]. All samples passed; on average X% of read pairs were removed.

Replace the version numbers with the output of fastqc --version, fastp --version and multiqc --version from your own run.

Should I run QC per lane or after merging lanes?

Per lane first. A problem on one lane or flow cell (for example a bubble or a failed cycle) is easy to see per lane and invisible once merged. After QC, merging is just cat lane1_R1.fastq.gz lane2_R1.fastq.gz > sample_R1.fastq.gz (gzip files can be joined directly).

Does this apply to Nanopore or PacBio long reads?

The ideas do, the tools mostly don’t. FastQC runs on long reads, but its thresholds assume short Illumina reads. Use long-read tools such as NanoPlot (part of NanoPack; De Coster et al. 2018) to look at read-length and quality distributions, and filter by length and mean quality instead of trimming adapters base by base.

Glossary

  • Read: one sequence produced by the sequencer from one end of a fragment.
  • Insert: the DNA fragment between the two adapters.
  • Adapter: a short synthetic sequence joined to fragments so they can be sequenced.
  • Phred score (Q): −10 × log10 of the probability that a base call is wrong.
  • Paired-end: both ends of each fragment are sequenced (R1 and R2).
  • Trimming: removing adapter or low-quality bases from reads.
  • Duplication: identical reads, from PCR copies or highly expressed genes.
  • Phasing: molecules in a cluster falling out of step during sequencing, which lowers quality along the read.
  • Insert size: length of the DNA fragment between adapters; shorter than the read length means adapter read-through.
  • Expected errors: the sum of error probabilities of all bases in a read.
  • Soft-clipping: an aligner leaving unmatched read ends out of the alignment without deleting them.
  • Optical duplicate: one cluster detected twice by the camera; recognised from nearby x/y coordinates.
  • UMI: unique molecular identifier, a random tag added to each molecule before PCR to tell PCR copies apart.
  • BQSR: base quality score recalibration, the empirical correction of quality scores before variant calling.

References

  1. Andrews S. FastQC: a quality control tool for high throughput sequence data. Babraham Bioinformatics. Module documentation and default limits.txt configuration.
  2. Bolger AM, Lohse M, Usadel B. Trimmomatic: a flexible trimmer for Illumina sequence data. Bioinformatics. 2014;30(15):2114–2120. doi:10.1093/bioinformatics/btu170
  3. Chen S, Zhou Y, Chen Y, Gu J. fastp: an ultra-fast all-in-one FASTQ preprocessor. Bioinformatics. 2018;34(17):i884–i890. doi:10.1093/bioinformatics/bty560
  4. Cock PJA, Fields CJ, Goto N, Heuer ML, Rice PM. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants. Nucleic Acids Research. 2010;38(6):1767–1771. doi:10.1093/nar/gkp1137
  5. De Coster W, D’Hert S, Schultz DT, Cruts M, Van Broeckhoven C. NanoPack: visualizing and processing long-read sequencing data. Bioinformatics. 2018;34(15):2666–2669. doi:10.1093/bioinformatics/bty149
  6. DePristo MA, Banks E, Poplin R, et al. A framework for variation discovery and genotyping using next-generation DNA sequencing data. Nature Genetics. 2011;43(5):491–498. doi:10.1038/ng.806
  7. Edgar RC, Flyvbjerg H. Error filtering, pair assembly and error correction for next-generation sequencing reads. Bioinformatics. 2015;31(21):3476–3482. doi:10.1093/bioinformatics/btv401
  8. Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016;32(19):3047–3048. doi:10.1093/bioinformatics/btw354
  9. Ewing B, Green P. Base-calling of automated sequencer traces using phred. II. Error probabilities. Genome Research. 1998;8(3):186–194. doi:10.1101/gr.8.3.186
  10. Illumina. Data quality and Q scores: binning and calibration on NovaSeq X and NextSeq 1000/2000 (2023); Sequencing chemistry: one-, two- and four-channel systems.
  11. Liao Y, Shi W. Read trimming is not required for mapping and quantification of RNA-seq reads at the gene level. NAR Genomics and Bioinformatics. 2020;2(3):lqaa068. doi:10.1093/nargab/lqaa068
  12. MacManes MD. On the optimal trimming of high-throughput mRNA sequence data. Frontiers in Genetics. 2014;5:13. doi:10.3389/fgene.2014.00013
  13. Martin M. Cutadapt removes adapter sequences from high-throughput sequencing reads. EMBnet.journal. 2011;17(1):10–12. doi:10.14806/ej.17.1.200; Cutadapt algorithm documentation.
  14. Shen W, Le S, Li Y, Hu F. SeqKit: a cross-platform and ultrafast toolkit for FASTA/Q file manipulation. PLoS ONE. 2016;11(10):e0163962. doi:10.1371/journal.pone.0163962
  15. Williams CR, Baccarella A, Parrish JZ, Kim CC. Trimming of sequence reads alters RNA-Seq gene expression estimates. BMC Bioinformatics. 2016;17:103. doi:10.1186/s12859-016-0956-2
  16. Wingett SW, Andrews S. FastQ Screen: a tool for multi-genome mapping and quality control. F1000Research. 2018;7:1338. doi:10.12688/f1000research.15931.2
  17. Wood DE, Lu J, Langmead B. Improved metagenomic analysis with Kraken 2. Genome Biology. 2019;20:257. doi:10.1186/s13059-019-1891-0

What to learn next

Clean reads are the input for every next step. The next tutorial in this learning path covers read alignment with BWA-MEM. Browse all free bioinformatics tutorials, or go further with video lectures, assignments and a certificate in Introduction to NGS and Sequencing QC, RNA-Seq Data Analysis or Whole Exome Sequencing (WES) Data Analysis.

Finished this tutorial?Sign in free to mark it complete and track your progress.