Info Details
Date Thursday 22/10/2026, 9:30 - 17:00
Room UG44B

General information:

  • Raw reads: /shared/team/2026_training/week2/reads
  • :warning: Do not copy and paste commands, they might require changes and some are only given for demonstration: please experiment

1. Getting started: exploring the raw data

The first step in any sequencing project is to understand what data you have. Before running any analysis, it is good practice to inspect the files available, check their sizes, and confirm that everything is in order.

Activate the QC conda environment:

conda activate /shared/team/conda/telatin.mmb-dtp/qc

Now explore the reads directory. Use find to list all files and ls -lh to check their sizes:

find /shared/team/2026_training/week2/reads -type f
find /shared/team/2026_training/week2/reads -type f -name "*.fastq.gz" | sort
ls -lh /shared/team/2026_training/week2/reads/isolate/illumina/
ls -lh /shared/team/2026_training/week2/reads/isolate/ont/

You should find:

  • Illumina paired-end reads for two isolates: T4 and T7 (R1 and R2 files each)
  • Oxford Nanopore (ONT) reads for the same two isolates: T4-ONT and T7-ONT
  • An additional ONT dataset: ERR3152364

Create your own working directory inside the week2 folder, using your name:

mkdir /shared/team/2026_training/week2/{your_name}

Replace {your_name} with your actual name (no spaces — use underscores if needed). This is where you will save all your output for today.


2. Seqfu: a quick preview of your reads

Seqfu is a toolkit for working with FASTQ and FASTA files. It provides a range of utilities for inspecting, filtering, and summarising sequence data.

Preview a file

Use seqfu less to interactively browse a FASTQ file and inspect the reads and their quality scores:

seqfu less /shared/team/2026_training/week2/reads/isolate/ont/T4-ONT.fastq.gz

Press q to quit.

Summary statistics

Use seqfu stats to get an overview of your sequencing files. Try the following flags:

  • -b — prints the basename of the file
  • -n — prints a nice table instead of TSV
  • -t — add thousands separator

Run stats on the ONT files:

seqfu stats /shared/team/2026_training/week2/reads/isolate/ont/T4-ONT.fastq.gz
seqfu stats /shared/team/2026_training/week2/reads/isolate/ont/T7-ONT.fastq.gz
seqfu stats -b /shared/team/2026_training/week2/reads/ont/ERR3152364.fastq.gz

What differences do you notice between the T4 and T7 ONT datasets in terms of read length and coverage?


3. FastQC: quality control of raw reads

FastQC is one of the most widely used tools for assessing the quality of raw sequencing data. It produces an HTML report with a series of quality metrics including:

  • Per-base sequence quality
  • Per-sequence quality scores
  • Sequence length distribution
  • GC content
  • Adapter content

Running FastQC

FastQC is already installed in the qc environment. The basic syntax is:

fastqc [options] <input_file> --outdir <output_directory>

First, create a fastqc output directory inside your working directory:

mkdir /shared/team/2026_training/week2/{your_name}/fastqc

Now run FastQC on the Illumina paired-end files for one isolate (e.g. T4):

fastqc \
  /shared/team/2026_training/week2/reads/isolate/illumina/T4_R1.fastq.gz \
  /shared/team/2026_training/week2/reads/isolate/illumina/T4_R2.fastq.gz \
  --outdir /shared/team/2026_training/week2/{your_name}/fastqc/

Then run it on an ONT file:

fastqc \
  /shared/team/2026_training/week2/reads/isolate/ont/T4-ONT.fastq.gz \
  -o /shared/team/2026_training/week2/{your_name}/fastqc/

Open the resulting .html reports in a browser and compare the Illumina and ONT quality profiles.

What differences do you see between the Illumina and ONT quality reports? Which modules are flagged as warnings or failures, and why?


4. fastp: trimming and filtering Illumina reads

fastp is a fast, all-in-one tool for preprocessing FASTQ files. It performs adapter trimming, quality filtering, and generates a QC report — all in a single step. It is significantly faster than older tools like Trimmomatic and produces both HTML and JSON reports.

Check the fastp manual for the full list of options:

fastp --help

Or visit: https://github.com/OpenGENE/fastp

Filtering Illumina paired-end reads

Create an output directory for your filtered reads:

mkdir /shared/team/2026_training/week2/{your_name}/illumina-filtered

Run fastp on the T4 Illumina paired-end dataset with the following filters:

  • Remove adapters (automatic detection)
  • Discard reads shorter than 100 bp
  • Discard reads where 30% or more of bases have a Phred quality score ≤ 20
fastp \
  --in1 /shared/team/2026_training/week2/reads/isolate/illumina/T4_R1.fastq.gz \
  --in2 /shared/team/2026_training/week2/reads/isolate/illumina/T4_R2.fastq.gz \
  --out1 /shared/team/2026_training/week2/{your_name}/illumina-filtered/T4_R1.fastq.gz \
  --out2 /shared/team/2026_training/week2/{your_name}/illumina-filtered/T4_R2.fastq.gz \
  --length_required 100 \
  --unqualified_percent_limit 30 \
  --qualified_quality_phred 20 \
  --html /shared/team/2026_training/week2/{your_name}/illumina-filtered/T4_fastp.html \
  --json /shared/team/2026_training/week2/{your_name}/illumina-filtered/T4_fastp.json

Open the HTML report and compare the before/after statistics.

How many reads were discarded? What percentage of reads passed the filters?


5. NanoPlot: visualising ONT read quality

NanoPlot is a tool designed specifically for visualising the quality and length distribution of Oxford Nanopore sequencing data. It generates a range of informative plots including:

  • Read length histogram
  • Read quality histogram
  • Length vs. quality scatter plot
  • Cumulative yield plot

Check the NanoPlot manual:

NanoPlot --help

Running NanoPlot on an ONT file

Create an output directory:

mkdir /shared/team/2026_training/week2/{your_name}/nanoplot

Run NanoPlot on the T4 ONT file:

NanoPlot \
  --fastq /shared/team/2026_training/week2/reads/isolate/ont/T4-ONT.fastq.gz \
  --outdir /shared/team/2026_training/week2/{your_name}/nanoplot/T4 

Then try it on the larger community ONT dataset:

NanoPlot \
  --fastq /shared/team/2026_training/week2/reads/ont/ERR3152364.fastq.gz \
  --outdir /shared/team/2026_training/week2/{your_name}/nanoplot/ERR3152364

Open the NanoPlot-report.html in each output directory.

Compare the read length and quality distributions of the isolate vs. community dataset. What do you observe?


Previous submodule:
Next submodule: