Module 4: Quality Control of Raw Reads: Phred Scores, FastQC & MultiQC Diagnostics
Tested Stacks:
GATK 4.6.1
Samtools 1.21
Nextflow 24.10
Seurat v5.1
Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
Module 04 • Quality Control
Track 18 • Practical Transcriptomics
Hands-On Code Included
Module 4: Quality Control of Raw Reads: Phred Scores, FastQC & MultiQC Diagnostics
Deconstructing the 4-line FASTQ structure, mathematical Phred quality scores Q = -10 log10(P), interpreting FastQC diagnostic plots (per-base quality, GC bias, adapter contamination), and aggregating reports with MultiQC.
4. Quality Control of Raw Reads: Phred Scores, FastQC & MultiQC
Each sequencing read is stored in standard 4-line FASTQ format. Line 4 contains ASCII characters representing the base call error probability:
@SRR12345678.1 1/1 ← Header (Instrument ID, Flowcell, Tile, Coordinates, Read 1)
NATCGATCGATCGATCGATCGATC... ← Sequence
+ ← Separator
#<<AFFFFJJJJJJJJJJJJJJJJ... ← ASCII Phred Quality Scores (Sanger / Phred+33)
NATCGATCGATCGATCGATCGATC... ← Sequence
+ ← Separator
#<<AFFFFJJJJJJJJJJJJJJJJ... ← ASCII Phred Quality Scores (Sanger / Phred+33)
The Phred Quality Score Formula
A Phred quality score ($Q$) is logarithmically linked to the probability ($P$) that the corresponding base call is incorrect:
$$Q = -10 \times \log_{10}(P)$$
$$\text{Q20} \implies P = 0.01 \quad (99\% \text{ Base Call Accuracy})$$
$$\text{Q30} \implies P = 0.001 \quad (99.9\% \text{ Base Call Accuracy})$$
Running FastQC & Aggregating Reports with MultiQC
# Run FastQC on all raw paired FASTQ files using 8 CPU threads
fastqc -t 8 00_raw_data/*.fastq.gz -o 01_qc_raw/
# Aggregate all individual HTML reports into one interactive MultiQC dashboard
multiqc 01_qc_raw/ -o 01_qc_raw/ --interactive --title "Raw Reads Quality Control"
⚠️
Common Pitfalls & Troubleshooting Checklist
- Java Heap Exhaustion (GATK / Picard): If processes terminate with
java.lang.OutOfMemoryError, set your environment variable explicitly:export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp". - Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with
samtools index -@ 4 sample.bam. - Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority:
conda config --set channel_priority strict. - Chromosome Naming Contamination: Always verify whether reference FASTA headers use
chr1or1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.