Spliced Alignment for Transcriptomic Reads

  • Spliced alignment is a fundamental process in transcriptomic bioinformatics that maps RNA sequencing reads to a reference genome while accounting for the removal of introns during RNA processing. In eukaryotic organisms, genes are commonly composed of exons and introns. During transcription, a precursor messenger RNA molecule is produced, and introns are removed through RNA splicing. The remaining exons are joined together to form mature RNA transcripts. When mature RNA is sequenced and its reads are aligned back to the genomic DNA, a read may correspond to two or more separated genomic regions because the intronic sequence is absent from the mature transcript. Spliced aligners are designed to recognize these exon–exon junctions and map transcriptomic reads accurately across them.
  • Conventional DNA read aligners are generally designed to map continuous sequences to a reference genome. They may interpret a large gap between two aligned parts of an RNA read as a deletion or may fail to identify the correct genomic location. Spliced aligners instead recognize that a long gap in the genomic reference may represent an intron rather than a genomic deletion. This distinction is essential for RNA-seq analysis because correct identification of exon boundaries is needed for gene expression estimation, transcript reconstruction, alternative splicing analysis, and identification of previously unannotated transcripts.
  • Spliced alignment is particularly important for eukaryotic transcriptomes, where genes may contain multiple exons separated by introns of widely varying lengths. A single RNA-seq read can overlap an exon, span an exon–exon junction, or cover several exons. Short reads may contain only a small sequence segment from each side of a junction, whereas long reads can span multiple exon junctions and sometimes cover an entire transcript. Spliced aligners must therefore identify suitable genomic positions for each read segment and determine whether the gaps between these segments are consistent with introns.
  • The central principle of spliced alignment is to divide a read into segments that align to different parts of the reference genome while preserving their order and orientation. The aligned segments are connected by gaps corresponding to introns. These gaps are represented in the alignment record as skipped regions of the reference sequence rather than as ordinary deletions. The aligner evaluates possible exon boundaries, splice signals, alignment scores, read quality, and genomic context to identify plausible alignments.
  • Many eukaryotic introns contain characteristic splice-site signals. The most common canonical splice junction in nuclear genes is GT–AG, referring to the two DNA bases at the beginning and end of the intron on the forward genomic strand. Other recognized junction types include GC–AG and AT–AC, although their frequencies differ among organisms and genes. These signals help spliced aligners distinguish plausible introns from arbitrary gaps. However, not every genuine splice junction follows the most common canonical pattern, and non-canonical junctions may occur. Aligners must balance sensitivity to unusual junctions with the risk of reporting false splice sites.
  • Spliced alignment typically begins with indexing the reference genome. The aligner creates an index that allows sequencing reads to be mapped efficiently to candidate genomic regions. It then identifies matching or similar sequence segments, often called seeds, within each read. These seeds are used to locate candidate positions in the genome. When a read contains an exon–exon junction, seeds from different parts of the read may map to separated genomic regions. The aligner evaluates whether these segments can be connected by a plausible intron and calculates an alignment score for the complete read.
  • The alignment process may use known gene annotations or discover splice junctions directly from the sequencing data. Annotation-guided alignment uses previously identified exon boundaries and splice sites from resources such as GENCODE, Ensembl, or RefSeq. These annotations can help align reads that contain short exon segments or ambiguous junction regions. However, annotation-guided alignment may be limited by incomplete transcript information and may favor previously known isoforms. Annotation-free or de novo junction discovery allows the aligner to identify potential novel splice sites, but it may also produce false junctions when reads are short, sequencing quality is poor, or repetitive sequences create ambiguous mappings.
  • Spliced alignment is commonly performed using reference-guided methods, in which RNA-seq reads are mapped to a reference genome. This approach preserves genomic coordinates and makes it possible to identify exon boundaries, introns, and transcript structures. Another strategy is transcriptome-based mapping, in which reads are mapped directly to a collection of known transcript sequences. Transcriptome-based methods are useful for expression quantification but do not always provide the same information about genomic splice junctions, novel exons, or unannotated transcript structures. Genome-based spliced alignment is therefore particularly important when the objective includes transcript discovery or detailed analysis of RNA processing.
  • STAR, or Spliced Transcripts Alignment to a Reference, is one of the most widely used aligners for short-read RNA sequencing. It uses a highly efficient indexing and mapping strategy designed to identify splice junctions across large reference genomes. STAR can perform rapid alignment of large RNA-seq datasets and supports both annotation-guided and novel splice-junction discovery workflows. It is widely used for gene expression analysis, alternative splicing studies, and transcriptome characterization. STAR can also produce alignment output suitable for downstream tools such as featureCounts, StringTie, and other transcriptomic analysis programs.
  • A typical STAR workflow begins by generating an index of the reference genome. The genome FASTA file and gene annotation file, commonly supplied in GTF format, can be used to build the index. The following example illustrates index generation:

STAR –runMode genomeGenerate \

     –runThreadN 12 \

     –genomeDir star_index \

     –genomeFastaFiles reference_genome.fa \

     –sjdbGTFfile genes.gtf \

     –sjdbOverhang 149

  • The –runMode genomeGenerate option instructs STAR to build the genome index. The –runThreadN option specifies the number of computational threads, while –genomeDir identifies the directory in which the index will be stored. The genome FASTA file provides the reference sequences, and the GTF file supplies known gene and exon annotations. The –sjdbOverhang value is generally selected based on the read length, commonly using the read length minus one for the relevant short-read dataset. The value shown is illustrative and should be adjusted to the actual read length and STAR workflow.
  • After index generation, STAR can align paired-end RNA-seq reads to the reference genome:

STAR –runThreadN 12 \

     –genomeDir star_index \

     –readFilesIn sample_R1.fastq.gz sample_R2.fastq.gz \

     –readFilesCommand zcat \

     –outFileNamePrefix sample_ \

     –outSAMtype BAM SortedByCoordinate

  • This command aligns paired-end reads, reads compressed FASTQ files using zcat, and produces a coordinate-sorted BAM file. STAR also generates alignment reports and splice-junction information. Important output files include the final alignment summary, the coordinate-sorted BAM file, and the splice-junction table. These outputs can be used for quality assessment, expression quantification, and transcriptomic analysis.
  • STAR supports a two-pass alignment strategy that can improve the detection of novel splice junctions. In the first pass, the aligner identifies candidate junctions from the sequencing reads. These junctions are then incorporated into the second-pass alignment, allowing reads that span newly discovered junctions to be aligned using the information collected during the first pass. A two-pass workflow is particularly useful when transcript annotation is incomplete or when the study aims to identify novel splice sites.
  • The following command illustrates a two-pass STAR alignment:

STAR –runThreadN 12 \

     –genomeDir star_index \

     –readFilesIn sample_R1.fastq.gz sample_R2.fastq.gz \

     –readFilesCommand zcat \

     –twopassMode Basic \

     –outFileNamePrefix sample_ \

     –outSAMtype BAM SortedByCoordinate

  • Two-pass alignment can improve the recovery of reads spanning novel junctions, but it does not guarantee that every detected junction is genuine. Low-support junctions, non-canonical splice signals, sequencing errors, and mapping to pseudogenes or repetitive regions can generate false positives. Novel junctions should therefore be evaluated using supporting read counts, alignment quality, splice-site motifs, biological context, and independent evidence where available.
  • HISAT2, or Hierarchical Indexing for Spliced Alignment of Transcripts 2, is another widely used aligner for short-read RNA-seq data. It uses a hierarchical indexing strategy based on the Burrows–Wheeler transform and FM-index. Its indexing system combines a global genome index with local indexes, allowing efficient mapping across large genomes while maintaining relatively modest memory requirements. HISAT2 is designed to align reads that span exon–exon junctions and supports both known splice sites and novel splice-junction discovery.
  • HISAT2 can use gene annotation information to improve alignment around known splice sites. Known splice sites can be extracted from a GTF annotation file and supplied to the aligner. This is particularly useful when reads contain short sequence anchors on either side of an exon junction. The program also supports strand-specific RNA-seq information, which helps identify the transcriptional orientation of reads and distinguish transcripts produced from overlapping genes on opposite strands.
  • The following example builds a HISAT2 index:

hisat2-build reference_genome.fa reference_index

  • Paired-end reads can then be aligned using:

hisat2 -p 12 \

       -x reference_index \

       -1 sample_R1.fastq.gz \

       -2 sample_R2.fastq.gz \

       -S sample_alignments.sam

  • The -p option specifies the number of threads, -x identifies the reference index, and -1 and -2 provide the paired-end FASTQ files. The output is written in SAM format. HISAT2 can also produce alignments suitable for transcript assembly through its downstream transcriptome assembly option:

hisat2 -p 12 \

       –dta \

       -x reference_index \

       -1 sample_R1.fastq.gz \

       -2 sample_R2.fastq.gz \

       -S sample_alignments.sam

  • The –dta option adjusts alignment reporting for downstream transcript assembly programs such as StringTie. HISAT2 also supports strand-specific alignment through the –rna-strandness option. The correct value depends on the library preparation protocol and should be determined from the experimental design or library documentation rather than guessed.
  • Minimap2 is particularly useful for long-read transcriptomic data generated by Oxford Nanopore or PacBio sequencing. Unlike STAR and HISAT2, which are commonly used for short-read RNA-seq, minimap2 is widely used for long-read spliced alignment. Its splice preset is designed for long RNA or complementary DNA reads that span exon–exon junctions. It identifies candidate sequence matches, chains them across the genome, and represents introns as skipped reference regions in the final alignment.
  • The following example aligns long RNA-seq reads using minimap2:

minimap2 -t 12 -ax splice reference_genome.fa long_reads.fastq > long_read_alignments.sam

  • For accurate long-read RNA-seq data, such as PacBio Iso-Seq reads, the splice:hq preset may be appropriate:

minimap2 -t 12 -ax splice:hq reference_genome.fa isoseq_reads.fastq > isoseq_alignments.sam

  • The choice between splice and splice:hq should reflect the sequencing technology and read accuracy. Minimap2 can also be used with SAMtools to sort and index the resulting alignments:

minimap2 -t 12 -ax splice reference_genome.fa long_reads.fastq | \

samtools sort -@ 4 -o long_read_alignments.sorted.bam

samtools index long_read_alignments.sorted.bam

  • The resulting BAM file can be used for downstream transcript reconstruction and long-read transcriptome analysis. Tools such as StringTie support long-read assembly workflows when provided with appropriately prepared spliced alignments.
  • Several additional tools have been developed for transcriptomic alignment and related analysis. TopHat2 was historically an important splice-aware aligner that used Bowtie-based mapping and junction discovery. It helped establish early RNA-seq analysis workflows, but it has largely been superseded by STAR and HISAT2 for many modern short-read applications. GMAP is another aligner designed for mapping cDNA and RNA sequences to genomic references. It is particularly relevant to transcript and long-read alignment, including the identification of exon structures and splice junctions. Other specialized programs, including STARlong and minimap2, have been used for long-read transcriptomic data. Tool suitability depends on the read type, sequencing technology, transcriptome complexity, and downstream analysis requirements.
  • Spliced alignment produces standard SAM or BAM records, but their interpretation differs from ordinary continuous DNA alignments. A particularly important feature is the CIGAR string, which describes how a read aligns to the reference. The N operation represents a skipped region of the reference sequence, typically corresponding to an intron in a spliced RNA alignment. For example, a CIGAR string of 18M95N33M indicates that 18 read bases align to the reference, a 95-base region of the reference is skipped, and another 33 read bases align after the skipped region. This pattern can represent a read spanning two exons separated by a 95-base intron.
  • The M operation in a CIGAR string represents aligned positions that may contain matches or mismatches; it does not distinguish them by itself. The = and X operations can distinguish exact matches and mismatches when emitted by the aligner. The N operation is different from D, which represents a deletion from the reference relative to the read alignment. Confusing an intron represented by N with a deletion represented by D can lead to incorrect interpretation of RNA-seq alignments.
  • Spliced alignment records may also contain optional tags that provide information about transcript strand, mapping multiplicity, and alignment details. For example, the XS tag is used by some aligners, including HISAT2, to indicate the strand of the transcript associated with a spliced alignment. Minimap2 can provide a ts tag for transcription-strand information in relevant spliced alignments. Downstream tools may rely on these tags when reconstructing transcripts or interpreting strand-specific RNA-seq data. Users should verify the expected tag conventions for the aligner and downstream software.
  • An important application of spliced alignment is the identification of alternative splicing. Alternative splicing occurs when a single gene produces different RNA transcripts through different combinations of exons or alternative splice-site selection. Common patterns include exon skipping, alternative 5′ splice sites, alternative 3′ splice sites, mutually exclusive exons, and intron retention. Spliced aligners identify the exon–exon junctions represented by sequencing reads, providing evidence for these transcript structures. The resulting junction information can be analyzed using specialized tools such as rMATS, MAJIQ, SUPPA2, and related programs, depending on the data type and experimental design.
  • Spliced alignment is also essential for transcript assembly. Transcript assembly attempts to reconstruct RNA molecules from aligned sequencing reads and identify the exon combinations that form expressed transcripts. Reference-guided transcript assemblers use genomic alignment coordinates to connect exons and infer transcript structures. StringTie is widely used for assembling and quantifying transcripts from short-read RNA-seq alignments and also provides a long-read mode. Other tools, including Scallop and FLAIR, support different transcript assembly and isoform analysis workflows. Transcript assembly can reveal previously unannotated isoforms, but the accuracy of reconstructed transcripts depends on read coverage, alignment quality, annotation completeness, and the complexity of the gene.
  • Spliced alignment also supports gene expression quantification. After reads are aligned, tools such as featureCounts and HTSeq can count reads assigned to genes or genomic features. Transcript-level quantification can be performed using tools such as StringTie or other transcript quantification methods. Alignment-based approaches retain genomic mapping information, which can be useful for detailed quality assessment and splice-junction analysis. Pseudoalignment and lightweight mapping methods, including Salmon and kallisto, provide alternative strategies for transcript abundance estimation and do not perform conventional full genomic spliced alignment in the same way as STAR or HISAT2.
  • The quality of spliced alignment depends on several factors. Read length is important because longer reads may contain more sequence information across exon boundaries, whereas very short reads may have insufficient sequence on one side of a junction. Sequencing quality affects the ability to identify matching regions and splice signals. Reference genome quality, annotation completeness, intron length, repetitive regions, paralogous genes, and pseudogenes can also influence alignment accuracy. In addition, library preparation protocols affect whether reads are stranded or unstranded, paired-end or single-end, and whether they represent polyadenylated RNA, total RNA, or specific RNA classes.
  • Strand-specific RNA-seq requires particular attention. In a stranded library, the orientation of the sequencing reads provides information about the original transcript strand. This is especially important when genes overlap or are located on opposite strands. If the correct library orientation is not supplied to the aligner or downstream counting software, reads may be assigned to the wrong genes or transcripts. Researchers should record the library preparation method and configure the alignment and quantification tools accordingly.
  • Mapping quality and alignment statistics should be examined after spliced alignment. Useful metrics include the percentage of reads mapped, uniquely mapped reads, multimapping reads, properly paired reads, mismatch rates, splice-junction counts, and the distribution of alignment lengths. STAR provides alignment summary reports and splice-junction output, while HISAT2 reports mapping statistics to standard error. SAMtools can be used to inspect alignment files and generate general mapping summaries. RNA-seq quality-control tools such as RSeQC can assess read distribution, gene-body coverage, strand specificity, and other transcriptomic characteristics.
  • The detection of novel splice junctions requires careful interpretation. A junction supported by many independent reads and consistent with known splice-site signals is generally more convincing than one supported by a single low-quality read. However, read support alone does not prove that a junction is biologically functional. Alignment artifacts, sequencing errors, genomic contamination, trans-splicing, pseudogene mapping, and incomplete reference annotations may complicate interpretation. Novel junctions should be evaluated using supporting read counts, sequence motifs, transcript structure, expression evidence, and independent experimental validation where necessary.
  • Spliced alignment also has limitations in the analysis of complex transcriptomes. Short reads may not provide enough information to determine which distant exons occur together in the same transcript. This creates ambiguity when reconstructing transcript isoforms, particularly in genes with many alternative exons. Long-read RNA sequencing can help resolve these relationships because a single read may span several exon junctions. Nevertheless, long-read sequencing can have its own limitations, including read errors, incomplete transcript capture, variable read lengths, and biases introduced during library preparation.
  • For reproducible transcriptomic analysis, researchers should record the reference genome assembly, annotation release, aligner name and version, indexing parameters, alignment options, read length, sequencing technology, library strandedness, and preprocessing steps. The reference genome and gene annotation should be compatible, and the same versions should be used throughout the workflow. Alignment statistics, splice-junction files, logs, and the final SAM or BAM files should be retained as appropriate. These records make it possible to reproduce the alignment and understand differences between analyses.
  • Spliced alignment is therefore a central component of RNA-seq bioinformatics. It enables transcriptomic reads to be mapped across exon–exon junctions, supports the discovery of known and novel splice sites, and provides the genomic alignment information required for gene expression analysis, transcript reconstruction, and alternative splicing studies. STAR and HISAT2 are widely used for short-read RNA-seq, while minimap2 and other specialized tools support long-read transcriptomic alignment. Understanding the algorithms, output formats, splice-junction signals, and limitations of these tools is essential for accurate interpretation of transcriptomic data.
Author:

Leave a Reply

Your email address will not be published. Required fields are marked *