1 of 72

FASTQ Processing, Quality Control & Read Trimming

From Bulk & scRNA-seq to Spatial Transcriptomics for Fighting Cancer 2026

Presented by Quynh Hoang

Date: Oct 18, 2026

Session ID: BU1.2

1

2 of 72

TABLE OF CONTENTS

    • FASTQ Raw File Architecture
    • Phred Quality Score
    • Quality Assessment With FastQC
    • MultiQC Report Aggregation
    • Adapter/Quality Trimming

2

3 of 72

What would you should after this lecture?

    • Read a FASTQ record and explain each of its four lines, including the Illumina header fields.
    • Convert between Phred scores, error probabilities and ASCII characters.
    • Interpret the main FastQC modules and tell real problems from expected RNA-seq patterns.
    • Use MultiQC to compare many samples and spot outliers.
    • Trimming adapter using Trimmomatic or Cutadapt.

3

4 of 72

Bulk RNA-seq: Upstream Analysis Workflow

INTRODUCTIONS

4

5 of 72

Quality problems

RAW DATA PROCESSING

    • Quality problems typically originate either in the sequencing itself or in the preceding library preparation.

5

6 of 72

Quality problems

RAW DATA PROCESSING

    • Including low-confidence bases, sequence-specific bias, 3'/5' positional bias, polymerase chain reaction (PCR), untrimmed adapters, and sequence contamination.

6

7 of 72

Quality problems

RAW DATA PROCESSING

    • These problems can seriously affect mapping to reference, assembly, and expression estimates, but luckily many of them can be corrected for by filtering, trimming, error correction, or bias correction.

7

8 of 72

Quality problems

RAW DATA PROCESSING

    • Some problems cannot be corrected for, but you should at least be aware of them when interpreting results.

8

9 of 72

1. FASTQ FILE STRUCTURE

9

10 of 72

    • FASTQ file stores sequencing (DNA or RNA) reads as plain text
    • Four lines per read:
      • 1. Read Identifier: usually start with @ - must be unique in file
      • 2. Base calls (A, T, C, G, N)
      • 3. Separator +
      • 4. Quality string: one quality character per base

FASTQ Raw File Structure

10

11 of 72

    • Standard output of Illumina

FASTQ Raw File Structure

11

12 of 72

Illumina Header

Sequencer ID: A = NovaSeq, M = MiSeq, NB = NextSeq

12

13 of 72

Illumina Header

No. of run on that instrument

13

14 of 72

Illumina Header

Flowcell ID

14

15 of 72

Illumina Header

Lane on that flowcell

15

16 of 72

Illumina Header

Imaging tile within the lane

16

17 of 72

17

18 of 72

Illumina Header

Cluster coordinates on that tile

18

19 of 72

Illumina Header

Read: 1 (R1 = Forward), 2 (R2 = Reverse)

19

20 of 72

Illumina Header

Filtered:

N = Passed, Y = Failed filter

20

21 of 72

Illumina Header

0: Not a control read

21

22 of 72

Illumina Header

Index: Sample barcode

22

23 of 72

Illumina Header

Sequencer ID: A = NovaSeq, M = MiSeq, NB = NextSeq

No. of run on that instrument

Flowcell ID

Lane on that flowcell

Imaging tile within the lane

Cluster coordinates on that tile

Read: 1 (R1 = Forward), 2 (R2 = Reverse)

Filtered:

N = Passed,

Y = Failed filter

0: Not a control read

Index: Sample barcode

23

24 of 72

2. SINGLE-END AND PAIRED-END SEQUENCING

24

25 of 72

In single-end sequencing, a single set of a flow complementary sequence, index sequence and adaptor sequence has been used.

​

Only generate one read => A single FASTQ file.

SINGLE-END

Read 1

5'

3'

25

26 of 72

Application:

    • Whole genome, whole exome and whole transcriptomics studies.
    • Not suitable for de novo sequencing.
    • Suitable for RNA-seq and CHIP-seq

SINGLE-END

26

27 of 72

PAIRED-END

Read 1

Read 2

5'

3'

3'

5'

27

28 of 72

Two reads are generated, known as forward and reverse reads (R1 and R2).

=> More no. of read => more accuracy of sequencing

Bridge amplification.

PAIRED-END

Index 1

P5

Adaptor

P7

Index 2

Adaptor

28

29 of 72

PAIRED-END

PE provides high-quality alignment and sequencing of repetitive regions

Suitable for de novo sequencing; genetic splice variations, mutations

29

30 of 72

Which is better ??

30

31 of 72

3. PRED QUALITY SCORE

31

32 of 72

Q = − 10 log10 P

Phred Quality Score

Probability of Incorrect Base Call

Base Call Accuracy

10

1 in 10

90%

20

1 in 100

99%

30

1 in 1,000

99.9%

40

1 in 10,000

99.99%

PHRED-SCORE

Q scores are defined as a property that is logarithmically related to the base calling error probabilities (P).

Q score high => increase accuracy

32

33 of 72

Q-SCORE

How confident the sequencer is that a base call is correct ?

Q = ASCII - 33

33

34 of 72

ASCII TABLE

34

35 of 72

A FASTQ quality character has an ASCII decimal value of 53 under Phred+33 encoding. What is the corresponding Phred quality score?

PRACTICE

35

36 of 72

A FASTQ quality character has an ASCII decimal value of 53 under Phred+33 encoding. What is the corresponding Phred quality score?

Key: 53 − 33 = 20, so the corresponding Phred quality score is Q20

PRACTICE

36

37 of 72

A base has a Phred quality score of Q30. What is its approximate sequencing error probability?

PRACTICE

37

38 of 72

A base has a Phred quality score of Q30. What is its approximate sequencing error probability?

Key: Q30 corresponds to an error probability of 10⁻³, which is 0.1%

PRACTICE

38

39 of 72

Under Phred+33 encoding, which quality character corresponds to Q35?

PRACTICE

39

40 of 72

Under Phred+33 encoding, which quality character corresponds to Q35?

Key: ASCII 68 ⟶ character is D

PRACTICE

40

41 of 72

Consider this FASTQ read under Phred+33 encoding:

ACGTA

+

5?I+D

What is the complete sequence of Phred quality scores for the five bases, in order? Use Q = ASCII − 33.

PRACTICE

41

42 of 72

Consider this FASTQ read under Phred+33 encoding:

ACGTA

+

5?I+D

What is the complete sequence of Phred quality scores for the five bases, in order? Use Q = ASCII − 33.

Key: Q20, Q30, Q40, Q10, Q35

The quality characters 5, ?, I, +, and D have ASCII values 53, 63, 73, 43, and 68, which give Q20, Q30, Q40, Q10, and Q35.

PRACTICE

42

43 of 72

4. QUALITY ASSESSMENT WITH FASTQC

43

44 of 72

FASTQC

A Quality Control application for FastQ files

FastQC is a program designed to spot problems in high throughput sequencing datasets.

44

45 of 72

FASTQC

It runs a set of analyses on one or more raw sequence files in fastq or bam format.

It will generate an HTML report for each file you process

45

46 of 72

PER BASE SEQUENCE QUALITY

46

47 of 72

PER TILE SEQUENCE QUALITY

47

Does sequencing quality differ between different tiles on flow cell?

48 of 72

PER SEQUENCE QUALITY SCORE

48

49 of 72

PER BASE SEQUENCE CONTENT

49

50 of 72

PER SEQUENCE GC CONTENT

50

51 of 72

PER BASE N CONTENT

51

52 of 72

SEQUENCE LENGTH DISTRIBUTION

52

53 of 72

SEQUENCE DUPLICATION LEVELS

53

54 of 72

ADAPTER CONTENT

54

55 of 72

5. MULTIQC REPORT AGGREGATION

55

56 of 72

MULTIQC

MultiQC is a tool to create a single report with interactive plots for multiple bioinformatics analyses across many samples.

A single HTML report is generated summarising the statistics for all logs found.

56

57 of 72

6. ADAPTER/QUALITY TRIMMING

57

58 of 72

How to remove adapter sequences from sequencing read ??

Index 1

P5

Adaptor

P7

Index 2

Adaptor

58

59 of 72

Quality trimming: remove low-quality bases

59

60 of 72

TRIMMING TOOLS

A bioinformatics program that processes sequencing reads by removing unwanted parts: adapter sequences, low-quality bases.

60

61 of 72

Trimming tools:

    • fastp
    • Trimmomatic
    • Cutadap

TRIMMING TOOLS

61

62 of 72

FASTP

provide ultrafast all-in-one preprocessing and quality control for FastQ data

62

63 of 72

TRIMMOMATIC

Palindrome mode => uses the read pair to detect even very short adapter read-through

Need adapter fasta file

63

64 of 72

CUTADAP

Specific sequence need to be cut

64

65 of 72

7. CREATING ENVIRONMENT AND INSTALLING TOOLS

65

66 of 72

BIOCONDA

Install miniforge

66

67 of 72

BIOCONDA

67

68 of 72

Add channels into miniforge

BIOCONDA

68

69 of 72

Create and Activate Environemnt

69

70 of 72

Install Tools: A Brief Guide

List tools installed

70

71 of 72

DOCUMENTS

Course Github repository: [Click here].

Practice examples: [Click here].

Data used for practice: Bioproject accession code PRJNA605185

71

72 of 72

THANK YOU FOR YOUR ATTENTION!

From Bulk & scRNA-seq to Spatial Transcriptomics for Fighting Cancer 2026

Date: Oct 04, 2026

72