CHAPTER 2

RNA-Seq Data Analysis: A Practical Guide for Model and Non-Model Organisms

A step-by-step workflow from raw reads to functional enrichment, for organisms with or without a reference genome.

Current Protocols, 2024, Volume 4, e1054 (Wiley Periodicals LLC). doi: 10.1002/cpz1.1054
Abstract
RNA sequencing (RNA-seq) has emerged as a powerful tool for assessing genome-wide gene expression, revolutionizing various fields of biology. However, analyzing large RNA-seq datasets can be challenging, especially for students or researchers lacking bioinformatics experience. To address these challenges, the authors present a comprehensive guide providing step-by-step workflows for analyzing RNA-seq data, from raw reads to functional enrichment analysis, starting with considerations for experimental design. It is designed to aid students and researchers working with any organism, irrespective of whether an assembled genome is available. The guide employs various recognized bioinformatics tools to navigate the landscape of RNA-seq analysis and discusses the advantages and disadvantages of different tools for the same task. The protocol focuses on clarity, reproducibility, and practicality so that users can navigate the complexities of RNA-seq data analysis easily and gain valuable biological insights. All scripts and a sample dataset are available in a GitHub repository to facilitate implementation of the analysis pipeline. The guide comprises three basic protocols: (1) analysis of data from a model plant with an available reference genome, (2) gene ontology enrichment analysis, and (3) de novo assembly of data from non-model plants.

Introduction

The development of high-throughput sequencing technologies has made it possible to uncover the transcriptional profiles of many organisms at the whole-genome level. RNA-seq, or messenger RNA (transcriptome) sequencing, lets researchers explore gene expression patterns with great precision in hundreds of model and non-model organisms. Even without a reference genome, RNA-seq has revealed a wealth of understanding about processes such as cellular development, gene function, and responses to environmental stimuli, and it has often set the basis for developing molecular genetic analysis in non-model organisms. Researchers focused mainly on wet-lab and field work sometimes struggle to exploit next-generation sequencing data because they lack bioinformatics experience, and this guide is intended to help bridge that gap.

Conventionally, an RNA-seq experiment subjects organisms or cells to at least two experimental conditions and then freezes the tissue or cells of interest to halt transcriptional activity and begin RNA extraction. Once the RNA is purified, cDNA libraries are constructed for all transcripts present at that moment. These transcripts commonly include different classes of RNA, such as tRNAs, ribosomal RNA, noncoding RNA, and messenger RNAs (mRNAs). Researchers are mainly interested in mRNAs that give rise to proteins, though there is growing interest in the differential expression of other RNAs such as small interfering RNAs (siRNAs) and microRNAs, which also regulate cellular processes. The cDNA libraries are then sequenced using one of several technologies; among the most widely used currently are those available commercially from Illumina.

In general, these protocols present quality analysis of the FastQ files, the trimming and mapping process, and differential gene expression analysis. They also include global analyses to aid interpretation, such as functional category enrichment analysis and data visualization through easily interpretable graphics, plus a processing approach for non-model organisms that lack an assembled and annotated genome. The authors encourage users to share scripts and output data on freely accessible platforms such as GitHub; all scripts and flowcharts provided are documented in a GitHub repository to ensure repeatability.

🎯 Key points
  • RNA-seq measures genome-wide gene expression and works for both model and non-model organisms.
  • A typical experiment compares at least two conditions, freezes tissue to halt transcription, extracts RNA, builds cDNA libraries, and sequences them (commonly on Illumina).
  • mRNA is the main interest, but siRNAs and microRNAs are increasingly studied.
  • The guide emphasizes clarity, reproducibility, and practicality, with all scripts on GitHub.

Strategic Planning and Experimental Design

When planning a differential gene expression experiment using RNA-seq, several factors are essential. First, the experimental design must clearly define the conditions to be contrasted so they correspond to the biological question of interest: the more precisely defined these are, the better the results. Second, having at least three biological replicates per condition is advisable, and striving for consistency between replicates is crucial because RNA-seq is highly susceptible to small fluctuations in experimental conditions, which can be reflected as experimental noise in the results.

The number of reads obtained after sequencing must also be considered. Typically, around 10 million reads per library is sufficient for most organisms. However, for plants with large genomes, such as maize (about 2.4 Gb), it is advisable to aim for at least 20 to 30 million reads for a meaningful differential gene expression analysis.

The sequencing files for each sample are recorded in FastQ format, which typically contains the read identifier, the sequence in the four bases (C, G, A, T, plus 'N' for an undefined base), the read orientation, and the quality with which each base was read. Quality is expressed in ASCII code and refers to Phred quality values. These values assess sequencing quality, and RNA-seq analysis conventionally begins by examining read quality with FastQC. After this, a trimming process to eliminate low-quality sequences and remove adapters is highly recommended, with Trimmomatic being one of the most versatile programs for the task. Once high-quality FastQ files are obtained, the next stage is mapping the reads to an assembled and annotated genome if available; when such resources are not available, de novo assembly is necessary.

Once read counts per gene are obtained, the user can analyze differential expression to identify genes whose expression changes significantly between the two conditions being compared. These protocols use DESeq2, which runs in the R environment, and also recommend edgeR as an alternative that performs essentially the same processing. Figure 1 of the paper proposes a general workflow for both model and non-model organisms.

🎯 Key points
  • Define the contrasted conditions precisely to match the biological question.
  • Use at least three biological replicates per condition and keep replicates consistent.
  • About 10 million reads per library suffices for most organisms; large-genome plants like maize need 20-30 million.
  • FastQ files store read ID, sequence, orientation, and per-base Phred quality (ASCII encoded).
  • Standard flow: FastQC -> Trimmomatic -> mapping (or de novo assembly) -> counts -> DESeq2/edgeR.

Basic Protocol 1: Analysis of Data From a Model Plant With a Reference Genome

This protocol outlines RNA-seq data analysis using the Arabidopsis thaliana reference genome. A typical analysis involves quality control and filtering of reads based on quality measures, alignment to the reference genome, and generation of the count matrix. Following the protocol enables differential expression analysis and visualization of results through graphs such as principal component analysis (PCA) plots, MA (M log-ratio, A mean-average) plots, volcano plots, and heatmaps, through which differentially expressed genes can be identified.

Efficient progress is achieved using the command line within a Unix/Linux environment. The authors worked on 64-bit Ubuntu 23.04; Windows users can use the Windows Subsystem for Linux (WSL), and macOS users can run identical commands in the terminal because of the shared Unix foundation. The necessary software includes FastQC, Trimmomatic, HISAT2, featureCounts (from Subread), and R. The recommended hardware is at least 4 GB of RAM and 50 GB of storage. Scripts and Docker containers are available in the authors' GitHub repository, and the sample dataset is on Zenodo.

The example dataset comes from a study characterizing the roles of the Nox genes of the fungus Trichoderma atroviride during its interaction with A. thaliana. The raw data are publicly available in the NCBI SRA database under accession PRJNA575031; the authors download compressed FastQ files from the European Nucleotide Archive (ENA) using wget, or alternatively via the SRA Toolkit (fasterq-dump). Twelve library files are downloaded, corresponding to biological replicates of the control (only Arabidopsis growing five days post-inoculation, without Trichoderma) and the treatment (Arabidopsis with the wild-type Trichoderma strain five dpi).

The first analysis stage is a quality check of the raw reads with FastQC (v0.11.9), which produces a .zip and an .html report per file that can be viewed in a web browser. Read trimming follows, using Trimmomatic; other tools exist for this task, including Trim Galore, Cutadapt, Skewer, SOAPnuke, and fastp. Trimmomatic handles both paired-end and single-end Illumina data. In the example, it scans reads with a 4-base sliding window and trims when the average quality drops below 15 (SLIDINGWINDOW:4:15), drops reads shorter than 36 bases (MINLEN:36), and removes adapters (ILLUMINACLIP using TruSeq3-PE.fa). The output reports the percentage of surviving reads, and a 'for' loop is used to process all samples efficiently.

After trimming, reads are aligned to a reference. When a reference genome is available, the transcript identities can be inferred by mapping reads to the genome or transcriptome. Alignment tools include HISAT2, STAR, TopHat2, Bowtie 2, and Rsubread, whereas Kallisto or Salmon can be used for pseudoalignment/quasi-mapping against a reference transcriptome. This protocol uses HISAT2 (v2.2.1), which employs a graph-based data structure and algorithm for rapid, sensitive alignment. Before mapping, an index of the reference genome is built with hisat2-build; the example uses the TAIR10 A. thaliana genome from EnsemblPlants. Indexing generates eight .ht2 files, and reads are then aligned per sample to produce SAM output, with the alignment report giving the overall alignment rate (about 97.5% in the example).

The SAM (Sequence Alignment Map) text files are converted to BAM (Binary Alignment Map), a compressed, non-human-readable but more efficient format, using Samtools. BAM files are then sorted (commonly by genomic coordinates) and indexed because reads are randomly ordered in the original file. After sorting, the SAM files can be deleted to save storage.

Read quantification counts the number of reads overlapping specific genomic features. Specialized tools such as featureCounts and HTSeq perform this task. First the EnsemblPlants GTF annotation file is downloaded and decompressed. featureCounts (v2.0.3) is run with paired-end mode, counting read pairs over exons grouped by gene_id. A shell script with a 'for' loop automates quantification across all sorted BAM files; each sample yields a .txt file with counts and a .summary file with metrics. Counts (column 7) and gene IDs (column 1) are extracted and pasted together to build a count matrix, whose headers are edited to match accession numbers to treatments.

Differential expression analysis determines quantitative changes in gene expression between experimental groups. Specialized tools such as edgeR and DESeq2, based on the negative binomial distribution, are prominent for this. This protocol uses DESeq2 in R, along with ggplot2, EnhancedVolcano, and pheatmap for plotting. The count matrix is loaded and columns reordered, a colData data frame describing sample conditions is created, and a DESeqDataSet is built with design ~ condition. A PCA plot (from an rlog transformation) verifies consistency between replicates. Low-count genes are pre-filtered (rowSums > 10) to improve computational efficiency and visualization clarity, though this is optional. DESeq() runs the analysis and results() extracts them, sorted by adjusted p-value.

The comparison of interest is set with the contrast argument, e.g. c('condition','Treatment','Control'). Adjusted p-values (padj) are corrected for multiple testing using the Benjamini-Hochberg method, which controls the false discovery rate (FDR). Differentially expressed genes (DEGs) are subset with padj < 0.05 and abs(log2FoldChange) > 1; a log2 fold change of 1 is a widely used reference, though not a mandatory filter. DEGs are split into up-regulated (log2FoldChange > 1) and down-regulated (log2FoldChange < -1) and exported to CSV. Results are visualized with a volcano plot (EnhancedVolcano), an MA plot (plotMA with alpha = 0.05), and a heatmap (pheatmap) of the top 10 DEGs after a log2 transformation of normalized counts.

🎯 Key points
  • Workflow: install tools -> download data -> FastQC -> Trimmomatic -> HISAT2 alignment -> SAM->BAM sort (Samtools) -> featureCounts -> DESeq2.
  • Example data: Trichoderma atroviride interacting with Arabidopsis thaliana (SRA PRJNA575031), aligned to the TAIR10 genome.
  • HISAT2 uses a graph-based index; alignment must be indexed first (hisat2-build) and yields ~97.5% overall alignment in the example.
  • featureCounts counts read pairs over exons by gene_id; outputs are merged into a count matrix.
  • DESeq2 uses the negative binomial model; DEGs called at padj < 0.05 and |log2FC| > 1, with Benjamini-Hochberg FDR correction.
  • Results visualized as PCA, MA, volcano, and heatmap plots.

Basic Protocol 2: Gene Ontology Enrichment Analysis

Basic Protocol 2 performs a functional enrichment analysis to understand the underlying biological processes captured by Gene Ontology (GO) terms. Several tools are available, including CAMERA, GOseq, topGO, clusterProfiler, and gprofiler2. This protocol focuses on clusterProfiler because of its user-friendly interface and efficient integration with the differential expression output from DESeq2. clusterProfiler performs over-representation analysis (ORA), a widely used approach to determine whether known biological functions or processes are over-represented (enriched) in an experimentally derived gene list such as a list of DEGs. Only R is required as software, with at least 4 GB of RAM and 1 GB of storage.

The required R packages are clusterProfiler, biomaRt, enrichplot, org.At.tair.db, and tidyverse, installed via BiocManager or install.packages. The exported DESeq2 table (up- or down-regulated genes) is read, and the genes and log2FoldChange columns are retained. DEGs are then annotated with Ensembl using biomaRt: an Arabidopsis mart is loaded from EnsemblPlants (plants_mart, host plants.ensembl.org, dataset athaliana_eg_gene), and getBM retrieves the ensembl_gene_id, entrezgene_id, and description for the DEGs.

A gene 'universe' is defined as the complete set of genes used as a basis for comparison against the subset of DEGs; here it is all Arabidopsis genes from the count matrix, also annotated via getBM. This comparison determines whether specific biological terms are over-represented in the DEGs relative to the entire set. For compatibility with the enrichGO function, the universe entrez IDs must be characters, not integers, so they are converted.

ORA is performed for the Gene Ontology Biological Process (BP) class using enrichGO, with keyType 'ENTREZID', ont 'BP', pAdjustMethod 'BH', and qvalueCutoff 0.05. The results are simplified with clusterProfiler::simplify to reduce redundant terms and exported to CSV. Three plots are produced: a dot plot showing the overall change quantity (GeneRatio), the significance of enrichment (adjusted p-value), and the gene count; a bar plot (a similar view without GeneRatio); and an enrichment map (emap plot), built after pairwise_termsim, which displays the relationships between GO terms and reveals linked, enriched processes. Packages used across the differential-expression and enrichment analyses include biomaRt, enrichplot, org.At.tair.db, EnhancedVolcano, and clusterProfiler.

🎯 Key points
  • clusterProfiler performs over-representation analysis (ORA) to find enriched GO terms in a DEG list.
  • biomaRt annotates genes against EnsemblPlants (athaliana_eg_gene) to obtain Entrez IDs and descriptions.
  • A 'universe' (all genes, e.g. the full count matrix) is the statistical background for enrichment.
  • enrichGO is run for the Biological Process ontology with Benjamini-Hochberg correction and a q-value cutoff of 0.05.
  • Results are visualized as dot plots, bar plots, and enrichment map (emap) plots.
  • GO enrichment quality depends heavily on the annotation level of the organism's genome (Arabidopsis is well annotated).

Basic Protocol 3: De Novo Assembly for Non-Model Plants

When no reference genome is available, the transcriptome must be constructed de novo. Basic Protocol 3 uses a dataset from a study exploring drought tolerance in Agave sisalana. Trinity is used for de novo assembly on a curated dataset of 10,000 reads for efficient execution on personal computers. Accurate analysis of real data demands substantial computational resources; the authors recommend about 1 GB of RAM per 1 million Illumina read pairs and, for realistic datasets, running the assembly on high-performance servers or cloud services such as Amazon Web Services. The required software is Trinity, CD-HIT, and Kallisto, with a minimum of 4 GB RAM and 5 GB storage. The example shares the quality-control (FastQC) and trimming (Trimmomatic) steps with Basic Protocol 1.

Trinity (v2.13.2) and CD-HIT (v4.8.1) are installed, and clean data are placed in a working folder. Sequencing data from treatment and control conditions are consolidated into a unified input via a samples.txt file that lists FastQ files organized by condition and replicate. Trinity is then run with --seqType fq, --samples_file, --CPU, and --max_memory set to the machine's capabilities. The assembly produces trinity_out_dir.Trinity.fasta (the assembled transcripts) and a gene-to-transcript map. In Trinity identifiers, the 'gene' is the prefix (e.g. TRINITY_DN992_c0_g1) and distinct isoforms carry different suffixes (e.g. _i1, _i2).

After assembly, quality is evaluated carefully because a subpar assembly can lead to misinterpretation of gene identification and differential expression. Key metrics include the read alignment rate, the ExN50 statistic, and BUSCO (count of universal single-copy genes recovered). A high alignment percentage is expected; around 70% may indicate satisfactory quality. There is no consensus optimal BUSCO value, as it varies between assemblers and configurations. The classic N50 (at least half the assembled bases lie in contigs of that length or longer) is not ideal for transcriptomes, where the goal is recovering many sequences rather than a few long contigs. The ExN50 statistic, which excludes low-expression contigs, is more appropriate and usually higher; however, no universal 'good' threshold exists, so it must be interpreted in the project context. In this protocol only basic assembly statistics are shown, obtained by counting transcripts (grep '>' | wc -l gives 2116) and running the bundled TrinityStats.pl script (reporting counts, N-values, GC content, and total assembled bases).

De novo assemblers often generate more sequences than the true gene count, owing to transcriptional artifacts, pre-mRNA, noncoding RNA, and isoforms from alternative splicing. Assembly reduction produces a manageable, non-redundant set of sequences. Tools for this include CD-HIT, Corset, Grouper, and Compacta. Here, CD-HIT-EST clusters transcripts at 90% identity (-c 0.9), reducing the number of contigs, after which the statistics can be revisited.

Transcript expression is then quantified with Kallisto via a Trinity-integrated script (align_and_estimate_abundance.pl), which produces one directory per replicate containing abundance.tsv files with expression in transcripts per million (TPM). Using the list of abundance files, another Trinity script (abundance_estimates_to_matrix.pl) builds count and TPM matrices at both the gene and isoform levels, normalized across samples using the TMM method. Users can then run differential expression using scripts integrated into Trinity or adapt Basic Protocol 1 with minimal changes. Because of space limitations, this protocol omits the full differential expression and annotation steps, which are similar to Basic Protocols 1 and 2.

🎯 Key points
  • Without a reference genome, Trinity assembles the transcriptome de novo (example: Agave sisalana drought study).
  • Compute is heavy: budget ~1 GB RAM per 1 million Illumina read pairs; use servers/cloud for real data.
  • Assembly quality is judged by alignment rate (~70%+), ExN50 (better than N50 for transcriptomes), and BUSCO completeness.
  • CD-HIT removes redundant transcripts (clustering at 90% identity) caused by isoforms, pre-mRNA, and artifacts.
  • Kallisto quantifies transcript abundance in TPM; Trinity scripts build gene- and isoform-level matrices normalized by TMM.
  • Trinity IDs encode gene prefix and isoform suffix (e.g. TRINITY_DN992_c0_g1_i1).

Commentary: Mappers, Resources, and Understanding Results

The guide offers two distinct approaches to differential gene expression. The first (Basic Protocols 1 and 2) uses HISAT2 to align reads to a reference genome; the second (an alternative protocol on GitHub) uses Kallisto pseudoalignment to predict transcripts. The authors strongly recommend HISAT2 as it tends to yield more precise results, but their comparison shows remarkable similarity between the two strategies at the level of differentially expressed genes. Therefore, for users with limited computational resources, Kallisto is an excellent way to significantly reduce time and computational load. Basic Protocol 3 addresses de novo assembly with Trinity for a non-model organism; although the demonstration was expedited by limiting reads to 10,000, realistic datasets demand substantially more resources.

Critical parameters include carefully selecting a suitable Linux-based system (Ubuntu 20.04 or higher is strongly recommended) and running command lines with appropriate computational resources without exceeding RAM and thread limits. Although many commands are executed with default parameters, thoroughly reviewing the parameter list is advisable, as suitable values may vary with the organism or project objectives. A brief troubleshooting table notes that a 'killed' process usually indicates limited memory or space (solution: use a high-performance server) and that unsuccessful installations may relate to device-specific versions (solution: install via Conda).

Interpreting the Basic Protocol 1 results: the PCA plot reveals consistent clustering between biological replicates for each condition and flags possible discrepancies. The MA plot shows log2 fold changes, with points below the alpha = 0.05 significance cutoff colored to indicate significance. The volcano plot highlights DEGs, both induced and repressed, providing a rapid perspective on the magnitude of expression changes based on log2 fold change and adjusted p-value. The heatmap of the top ten DEGs shows a well-defined group of genes negatively regulated in the control and overexpressed in the treatment, consistent with the original Trichoderma-Arabidopsis study.

For Basic Protocol 2, functional category enrichment gives an overall view of the biological phenomenon and relies heavily on the genome's annotation level, which is comprehensive for Arabidopsis. The dot plot, bar plot, and emap plot together demonstrate result consistency and highlight significant, related processes. For Basic Protocol 3, the demonstration assembly was low quality because of the minimal dataset used, so detailed assembly statistics and downstream differential expression were not shown. Regarding time, Basic Protocols 1 and 2 take about one day depending on computing power, and Basic Protocol 3 about four hours for the reduced dataset.

🎯 Key points
  • HISAT2 (alignment) and Kallisto (pseudoalignment) give very similar DEG results; Kallisto is faster and lighter.
  • Recommend Ubuntu 20.04+ and matching RAM/thread settings to hardware; a 'Killed' process signals insufficient memory.
  • Prefer Conda installation when apt installs fail.
  • PCA checks replicate consistency; MA and volcano plots summarize significance and fold change; heatmaps show top DEGs.
  • GO enrichment quality tracks the completeness of the organism's genome annotation.
  • Time: Protocols 1 and 2 ~1 day; Protocol 3 ~4 hr on the reduced dataset.

Figures

5 figures extracted from the source PDF — click any to enlarge.

Proposed workflows for model (A) and non-model organisms (B).⤢
Figure 1 Proposed workflows for model (A) and non-model organisms (B).
Quality analysis performed by FastQC. (A and B) Per-base sequence quality of the SRR10207218_1.fastq.gz library before (A) and after (B) read trimming with Trimmomatic.⤢
Figure 2 Quality analysis performed by FastQC. (A and B) Per-base sequence quality of the SRR10207218_1.fastq.gz library before (A) and after (B) read trimming with Trimmomatic.
Graphics generated from the analysis of differential gene expression. (A) PCA plot il- lustrates the variation between treatment and control replicates. (B) MA plot displays the log2 (fold change) of the treatment over the mean of normalized counts.⤢
Figure 3 Graphics generated from the analysis of differential gene expression. (A) PCA plot il- lustrates the variation between treatment and control replicates. (B) MA plot displays the log2 (fold change) of the treatment over the mean of normalized counts.
GO term enrichment results obtained using clusterProfiler display enriched categories for genes in the treatment versus control contrast (upregulated genes). (A) Dot plot, (B) bar plot, and (C) enrichment map (emap) plot showcase the top enriched GO terms based on over- Pola-Sánchez et al. representation analysis. 17 of 30⤢
Figure 4 GO term enrichment results obtained using clusterProfiler display enriched categories for genes in the treatment versus control contrast (upregulated genes). (A) Dot plot, (B) bar plot, and (C) enrichment map (emap) plot showcase the top enriched GO terms based on over- Pola-Sánchez et al. representation analysis. 17 of 30
Differentially expressed genes (DEGs) obtained by HISAT2 and Kallisto. (A) Bar graph illustrating the number of induced and repressed genes for each bioinformatics tool. (B and C) Venn diagrams illustrating upregulated (B) and downregulated (C) genes shared and unique be- tween HISAT2 and Kallisto.⤢
Figure 5 Differentially expressed genes (DEGs) obtained by HISAT2 and Kallisto. (A) Bar graph illustrating the number of induced and repressed genes for each bioinformatics tool. (B and C) Venn diagrams illustrating upregulated (B) and downregulated (C) genes shared and unique be- tween HISAT2 and Kallisto.

Test yourself

8 questions on this chapter.

Q1How many biological replicates per condition does the guide recommend for an RNA-seq differential expression experiment?
Q2Which criteria does the protocol use to call a differentially expressed gene (DEG) with DESeq2?
Q3In Basic Protocol 1, which aligner is used to map reads to the Arabidopsis reference genome?
Q4What is the purpose of the 'universe' in the over-representation analysis performed by clusterProfiler?
Q5Which tool is used for de novo transcriptome assembly in the non-model organism protocol?
Q6Why is the ExN50 statistic preferred over the classic N50 for evaluating transcriptome assemblies?
Q7In the FastQ workflow, what does the Phred quality value encoded in ASCII represent?
Q8According to the commentary, when is Kallisto pseudoalignment an especially good choice compared with HISAT2?
You can submit early — unanswered questions count as incorrect.