Protocols

Bulk RNA-seq: from FASTQ to differentially expressed genes

Trim, quantify and test a two-condition experiment, then draw the PCA, volcano and heatmap to show it.

Experiment
RNA-seq
Level
Beginner
Hands-on
About an hour to set up
Checked
25 October 2026

What you need

INPUTFASTQQCfastpALIGNSTARQUANTSalmonSTATSDESeq2
The pipeline this protocol builds. More on RNA-seq
InputFormat
ReadsOne pair of files per sample for paired-end data, or one file for single-end..fastq.gz
Sample sheetOne row per sample: its name, its condition, its batch if it has one, and its files..csv
ReferenceGenome or transcriptome and its annotation, from the same source and release..fa .gtf

Before you start

  • At least three biological replicates per condition. Fewer and the statistics have little to work with.
  • A sample sheet whose condition names are exactly the ones you will compare.
  • A note of anything that differs between samples apart from the condition: extraction day, sequencing run, operator. These are your batches.
  • The reference for your organism, with the sequence and annotation from the same release.

Steps

  1. 1

    Load your samples

    Uses Reads + Sample Sheet

    Drop a Reads step and a Sample Sheet step on the canvas and point them at your files. The sample sheet pairs each sample with its reads.

    Before going on, check every sample in the sheet has its files matched. A sample with no files, or a file with no sample, usually means a typo in a name.

  2. 2

    Trim and check quality

    Uses fastp

    Connect the reads to fastp. It removes adapter sequence and low-quality bases, and writes a quality report per sample.

    Detect adapters (paired-end)
    Finds the adapter from the read overlap, so you do not need to know the kit.
    Minimum length
    Reads shorter than this after trimming map poorly and are dropped.

    Before going on, check the share of reads that pass the filter, which is usually above 90%. High duplication is normal in RNA-seq, because abundant transcripts are sequenced many times over.

  3. 3

    Count reads per gene

    Uses Salmon

    Connect the trimmed reads and the reference to Salmon. It estimates how many reads came from each transcript and sums them to genes.

    Library type
    Salmon detects whether the library is stranded, which is easy to get wrong by hand.
    Index
    The decoys stop reads from unannotated regions being counted against a similar gene.

    Before going on, check the mapping rate per sample. Most well-annotated organisms map above 70%. A sample well below the others is worth a look before going further.

  4. 4

    Test for differential expression

    Uses DESeq2

    Connect the counts and the sample sheet to DESeq2, tell it which condition to compare against which, and include your batches in the design.

    Design
    Accounts for batch before testing condition. Leave batch out and a batch difference can be read as biology.
    Contrast
    The order matters: a positive fold change means higher in the first.
    Adjusted p-value
    Corrected for testing every gene at once.

    Before going on, check the PCA before the gene list. Replicates should sit together, and the main split should be your condition. If it is the sequencing run instead, go back and add it to the design.

  5. 5

    Draw the figures

    Uses Figures

    Bind a PCA, a volcano plot and a heatmap of the top genes to the DESeq2 output. They redraw whenever the step above them changes.

    Minimum |log2 fold change|
    Draws the lines that mark a doubling or halving, so large but uncertain changes stand apart.
    Genes to label
    Enough to orient a reader without covering the plot.

    Before going on, check that genes you expect not to change, such as common housekeeping genes, are not among the significant ones.

When it goes wrong

Mapping rate under 50% in every sample
Likely cause. The reference is for a different organism or release, or the library is mostly ribosomal RNA.What to do. Check the reference matches the organism, then look at the overrepresented sequences in the fastp report.
The PCA separates samples by run or day, not condition
Likely cause. A batch effect larger than the biology.What to do. Add the batch column to the sample sheet and use ~ batch + condition as the design.
Almost no significant genes
Likely cause. Too few replicates, or one replicate unlike the rest.What to do. Look at the sample correlation heatmap for an outlier. Removing a sample is a judgement call; note it if you do.
Thousands of significant genes with tiny fold changes
Likely cause. Many replicates make small differences significant.What to do. Raise the minimum fold change for what you report, and rank by the shrunken fold change.

What you get

  • A table of every gene with its fold change and adjusted p-value
  • Normalised counts for every sample
  • PCA, volcano plot and heatmap, exportable as SVG
  • A quality report for every sample

Why it is done this way: Your first differential expression analysis, step by step.

More protocols