omics.co.in logo omics.co.in

1. Quality Control, Trimming & Preprocessing

⚡ Category 1 of 14  ·  🧬 8 Primary Tools

Raw high-throughput sequencing data requires stringent quality profiling, adapter clipping, low-quality tail trimming, and artifact filtering prior to downstream alignment.

🔍 Ctrl + K

1. Quality Control, Trimming & Preprocessing

8 Primary Tools

Raw high-throughput sequencing data requires stringent quality profiling, adapter clipping, low-quality tail trimming, and artifact filtering prior to downstream alignment.

ToolApplication / PurposePlatform / TechnologyAction
FastQC →Standard per-base quality profiling, GC content, duplication ratesShort-read (Illumina, MGI)View Code ↓
MultiQC →Aggregates QC metrics from dozens of bioinformatics tools into one HTML reportAll NGS platformsView Code ↓
fastp →Ultra-fast all-in-one FASTQ preprocessor (QC, adapter trimming, polyG/X clipping, filtering)Short-readView Code ↓
Trimmomatic →Flexible adapter and quality trimmingShort-readView Code ↓
Cutadapt →Precise adapter trimming, demultiplexing, UMI handlingShort/Long-readView Code ↓
NanoPlot / NanoQC →QC summary statistics and plotting for Oxford Nanopore and PacBio dataLong-read (ONT/PacBio)View Code ↓
Porechop / Chopper →Adapter trimmer and quality/length filter optimized for ONT readsLong-read (ONT)View Code ↓
FastK / fastk →High-speed k-mer counter used for raw read profilingShort/Long-readView Code ↓
🌐 Extended QC & Preprocessing Ecosystem: Commonly Deployed Alternatives
Trimming & QC: fastp, FastQC, MultiQC, Cutadapt, Trimmomatic, Trim Galore, BBDuk (BBTools)
Long-Read QC: NanoPlot, NanoFilt, pycoQC, Filtlong, Porechop
Sequence Manipulation: SeqKit, seqtk
Alignment & Coverage QC: mosdepth, Qualimap, Picard, samtools stats
🔬

FastQC: High-Throughput Read Quality Profiling

Short-Read Illumina / MGI

FastQC evaluates raw sequencing quality across 11 diagnostic modules: per-base sequence quality, per-tile quality, per-sequence GC content, duplication levels, overrepresented sequences, and adapter contamination. Run in parallel across paired-end FASTQ archives.

# 1. Create QC output directory
mkdir -p fastqc_raw_reports/

# 2. Run FastQC in parallel on multiple paired-end FASTQs with custom adapters
fastqc \
  --threads 8 \
  --outdir fastqc_raw_reports/ \
  --extract \
  sample1_R1.fastq.gz sample1_R2.fastq.gz \
  sample2_R1.fastq.gz sample2_R2.fastq.gz

# 3. Quickly verify PASS / WARN / FAIL statuses across all samples in terminal
for summary in fastqc_raw_reports/*/summary.txt; do
    echo "=== Sample: $(dirname $summary) ==="
    awk '{printf "%-6s : %s\n", $1, $2}' "$summary"
done
Key Flags: --threads 8 specifies thread count; --extract uncompresses the report archive for instant inspection; --outdir directs outputs into a clean destination folder.
📊

MultiQC: Modular Quality Metric Aggregation

Universal QC All Platforms

MultiQC parses log outputs and summary statistics from dozens of independent bioinformatics tools (FastQC, fastp, Samtools, Cutadapt, Bowtie2, STAR) and synthesizes them into an interactive, publication-ready HTML dashboard.

# 1. Aggregate QC logs across all sample directories into an interactive dashboard
multiqc . \
  --outdir multiqc_dashboard/ \
  --filename cohort_qc_report.html \
  --title "Cohort NGS Quality Metrics" \
  --interactive \
  --export \
  --zip-data-dir

# 2. View summary metric table directly in terminal
head -n 25 multiqc_dashboard/cohort_qc_report_data/multiqc_general_stats.txt
Key Flags: . scans the current working directory recursively; --interactive enables dynamic plot features (zoom, re-order, scatter); --export extracts parsed metrics as flat TSV/JSON tables for downstream scripting.
⚡

fastp: Ultra-Fast All-in-One FASTQ Preprocessor

C++ Accelerated All-in-One

Written in multi-threaded C++, fastp is the modern gold standard for short-read preprocessing. It performs adapter trimming (auto-detects paired-end adapters from overlap), quality trimming (sliding window), poly-G clipping (crucial for NovaSeq 2-color chemistry), UMI parsing, and outputs interactive HTML/JSON reports in a single pass.

# Production paired-end execution with auto-adapter detection and polyG tail clipping
fastp \
  --in1 sample_R1.fastq.gz \
  --in2 sample_R2.fastq.gz \
  --out1 clean_R1.fastq.gz \
  --out2 clean_R2.fastq.gz \
  --detect_adapter_for_pe \
  --trim_poly_g \
  --poly_g_min_len 10 \
  --cut_front \
  --cut_tail \
  --cut_window_size 4 \
  --cut_mean_quality 20 \
  --qualified_quality_phred 20 \
  --unqualified_percent_limit 30 \
  --length_required 50 \
  --html sample_fastp.html \
  --json sample_fastp.json \
  --thread 8
Key Flags: --detect_adapter_for_pe automatically detects adapters without requiring an adapter fasta; --trim_poly_g removes non-fluorescing dark G-tail artifacts from 2-dye Illumina systems; --qualified_quality_phred 20 enforces Q20 (99% base call accuracy).
✂️

Trimmomatic: Flexible Quality & Adapter Trimming

Short-Read Java Standard

Trimmomatic provides granular step-by-step pipeline control for Illumina data. It leverages palindrome mode for reading through short fragments, clips low-quality read tails, and properly partitions paired reads from orphans whose mate failed quality filtering.

# Trimmomatic paired-end adapter clipping and sliding-window quality trimming
trimmomatic PE \
  -threads 8 \
  -phred33 \
  sample_R1.fastq.gz sample_R2.fastq.gz \
  clean_paired_R1.fastq.gz clean_unpaired_R1.fastq.gz \
  clean_paired_R2.fastq.gz clean_unpaired_R2.fastq.gz \
  ILLUMINACLIP:/usr/share/trimmomatic/TruSeq3-PE-2.fa:2:30:10:2:keepBothReads \
  LEADING:3 \
  TRAILING:3 \
  SLIDINGWINDOW:4:20 \
  MINLEN:36
Key Flags: ILLUMINACLIP:seed:palindrome:simple:minAdapterLength:keepBothReads searches for adapter sequences; SLIDINGWINDOW:4:20 clips when average Phred score over a 4-base window falls below 20; MINLEN:36 discards reads trimmed below 36 bp.
🎯

Cutadapt: High-Precision Adapter Trimmer & Demultiplexer

Short/Long-Read Demultiplexing

Cutadapt specializes in finding and removing adapter sequences, primers, poly-A tails, and unique molecular identifiers (UMIs) with semi-global alignment and configurable error tolerance. Widely used in small RNA-seq, amplicon panels, and custom library constructs.

# 1. Paired-end Illumina TruSeq adapter trimming with error tolerance
cutadapt \
  -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCA \
  -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT \
  -q 20,20 \
  --minimum-length 35 \
  --overlap 5 \
  --error-rate 0.1 \
  --cores 8 \
  -o clean_R1.fastq.gz \
  -p clean_R2.fastq.gz \
  raw_R1.fastq.gz raw_R2.fastq.gz \
  > cutadapt_trimming_report.txt

# 2. Trim 3' Poly-A tails in mRNA/Single-cell libraries (minimum 15 A's)
cutadapt \
  -a "A{15}" \
  --minimum-length 30 \
  --cores 4 \
  -o polyA_clean_R1.fastq.gz \
  raw_R1.fastq.gz
Key Flags: -a / -A specifies forward and reverse 3' adapters; -q 20,20 trims low quality ends of R1 and R2; --overlap 5 ensures short spurious matches are not falsely trimmed; --cores 8 enables multi-core acceleration.
📈

NanoPlot & NanoQC: Long-Read Quality Profiling & Yield Metrics

Long-Read ONT & PacBio

Designed specifically for long reads (Oxford Nanopore Technologies and PacBio HiFi/CLR). NanoPlot computes N50, total throughput, median read length, and generates bivariate length-vs-quality plots and pore activity heatmaps.

# 1. Profile Oxford Nanopore FASTQ reads with interactive hexbin plots
NanoPlot \
  --fastq ont_sample.fastq.gz \
  --outdir nanoplot_qc_report/ \
  --prefix ONT_Run_ \
  --plots hex dot \
  --loglength \
  --minlength 500 \
  --minqual 8 \
  --threads 8 \
  --format png html

# 2. Ultra-fast direct parsing of ONT sequencing_summary.txt (no FASTQ decompression needed)
NanoPlot \
  --summary sequencing_summary.txt \
  --outdir nanoplot_summary_report/ \
  --readtype 1D2 \
  --threads 8
Key Flags: --loglength applies log10 scaling to the wide read length distribution; --minlength 500 filters short fragments below 500 bp; --summary parses real-time MinKNOW sequencing summaries in seconds.
🧬

Porechop & Chopper: ONT Adapter Demultiplexing & Quality Filtering

Long-Read Rust-Powered

Oxford Nanopore reads often contain residual sequencing adapters or chimeras. Porechop identifies and strips end adapters and splits chimeric reads with internal adapters. Chopper (written in Rust as a high-speed NanoFilt successor) streams FASTQ files for length and mean Phred quality filtering.

# 1. Demultiplex and strip ONT adapters using Porechop
porechop \
  -i raw_nanopore_reads.fastq.gz \
  -b ./demultiplexed_barcodes/ \
  --barcode_diff 5 \
  --threads 8 \
  --format fastq.gz

# 2. Streamline Chopper filtering (Rust): Min length 1000 bp, Max length 60,000 bp, Quality >= Q10
zcat ./demultiplexed_barcodes/BC01.fastq.gz | \
  chopper \
    --minlength 1000 \
    --maxlength 60000 \
    --quality 10 \
    --threads 8 | \
  gzip > BC01_clean_Q10.fastq.gz
Key Flags: porechop -b enables barcode binning; chopper --quality 10 eliminates error-prone reads below Q10; Unix pipe stream processing eliminates intermediate disk writes.
🔢

FastK: High-Speed K-mer Counter & Raw Read Profiler

Short & Long-Read K-mer Profiling

FastK (Gene Myers) is an ultra-fast, memory-lean k-mer counter tailored specifically for both short (Illumina) and long (PacBio HiFi, Oxford Nanopore) raw reads without pre-correction. It counts canonical k-mers (up to k=50), estimates genome size and heterozygosity, and profiles sequencing error rates.

# 1. Count canonical 40-mers on raw sequencing reads (Illumina or PacBio HiFi)
FastK \
  -k40 \
  -t8 \
  -M32 \
  -bc1 \
  -p sample_reads.fastq.gz \
  -Nsample_k40

# 2. Generate k-mer frequency histogram (input for GenomeScope 2.0 genome size estimation)
Histex -G sample_k40 > sample_k40.hist

# 3. Query specific k-mer counts or extract top-frequency k-mer table
Tabex -t sample_k40 | head -n 30
Key Flags: -k40 sets k-mer length to 40; -t8 designates 8 compute threads; -M32 limits peak RAM usage to 32 GB; Histex -G formats the output histogram for GenomeScope mathematical modeling.
← Return to Home Hub
📦 Practice Datasets
🗺️ NGS Data Analysis Process & Workflow Architecture (High-Resolution)
⬇️ Download
NGS Analysis Process Graph Full View