Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Gene Assignment at Exon and Transcript Boundaries

Single-Cell Technologies and Count Data · Tutorial 13 of 700

Gene Assignment at Exon and Transcript Boundaries

See how annotation and feature-counting rules turn reads near exon and transcript boundaries into gene-level counts—or leave them unassigned.

Beginner 10 min read

What You'll Learn

  • Distinguish exon-only counting from counting that also includes intronic reads.
  • Determine how a read spanning an exon junction can overlap a gene’s exons.
  • Explain why reads overlapping multiple genes may be excluded or handled by an explicit ambiguity rule.
  • Compare gene-level assignment with the more demanding task of transcript-level assignment.
  • Identify annotation, strand, and overlap settings that should be checked when counts differ.

Why Boundary Rules Matter

An aligned read does not carry a label saying which gene produced it. A feature-counting procedure compares its aligned genomic positions with features in a gene annotation and applies rules to decide whether it contributes to a gene-level entry. A read near an exon edge, in an intron, or in a region shared by overlapping genes can therefore be treated differently under different valid counting conventions.

This is a measurement decision, not a statistical test. The resulting gene counts depend on the annotation and assignment rules as well as on the underlying RNA molecules. As in the earlier material on aligning reads and assigning them to genes, genomic alignment and gene assignment are distinct steps: an alignment locates sequence on the reference, while a counting rule determines which annotated feature, if any, receives credit.

Definition: A feature is an annotated genomic interval or set of intervals used for counting, such as an exon or a gene. A read is assigned to a gene when the counting procedure's stated overlap, strand, and ambiguity rules identify that gene as an eligible target. A read that does not meet those rules may be unassigned.

Exons, Introns, and Gene-Level Features

A gene can have multiple transcripts, and a transcript can contain multiple exons separated by introns. The exon coordinates of different transcripts from the same gene may overlap or differ. For gene-level counting, a common construction is the union of the annotated exons for that gene: a genomic position is exonic for the gene if it is in an exon of at least one annotated transcript of that gene. This combines transcript-specific exon intervals into one gene-level target.

In an exon-only scheme, a read contributes to a gene when its aligned bases satisfy that scheme's overlap criterion for the gene's exonic feature. A read lying wholly within an annotated intron does not meet that criterion. Some workflows instead include intronic regions, often to capture RNA that has not yet been fully spliced. Whether introns are included is a protocol and pipeline choice, not a universal property of single-cell counts.

A read aligned across a splice junction can still overlap exons: a splice-aware alignment represents its aligned portions on either side of the skipped intron. If those aligned portions overlap exons of the same gene, an exon-based gene counter can assign it to that gene. By contrast, a read whose aligned bases fall only in the intervening intron is not exonic merely because it is near an exon boundary.

“Overlap” also needs a precise operational rule. A counter might require at least one aligned base in an exon, a specified minimum number of bases, or another threshold. It may handle paired reads as a fragment, combining the aligned portions of both mates, rather than treating each mate as an independent observation. The rule must be read from the counting method in use; the word “overlap” alone does not specify it.

Worked Example: Exonic, Intronic, and Ambiguous Reads

Suppose a hypothetical annotation has gene G1 with exons at positions 100–149 and 200–249, and gene G2 with an exon at 300–349. Six uniquely aligned, single-end reads come from one hypothetical cell. Assume an unstranded, exon-only rule that accepts any aligned exonic base and excludes reads assigned to more than one gene.

ReadAligned positionsInterpretation under the stated rule
r1110–129Overlaps G1 exon 1
r2215–234Overlaps G1 exon 2
r3140–149 and 200–209Spans a splice junction and overlaps G1 exons
r4160–179Intronic for G1; overlaps no exon
r5140–159Overlaps G1 exon and, hypothetically, an exon of a second gene
r6400–419Overlaps no annotated exon

Reads r1, r2, and r3 each have a unique eligible gene, G1. Read r4 has no exonic overlap, r5 has two eligible genes and is excluded as ambiguous, and r6 has no annotated feature. Thus G1 receives 3 reads, and G2 receives 0. If the same hypothetical procedure included intronic reads and r4 had a unique intronic assignment to G1, G1 would receive 4 reads instead. That change follows from changing the feature definition; it does not mean the alignment of r4 changed.

The example counts reads, not deduplicated molecules. In a UMI-based workflow, the pipeline may use read assignments as part of assigning and collapsing molecules; the final count unit depends on that workflow's conventions.

Ambiguity Across Genes and Transcripts

A read can overlap more than one gene. This happens, for example, when genes overlap on the same strand or on opposite strands. If the available evidence and counting rule do not distinguish the genes, the read is ambiguous at the gene level. A common policy is to exclude such reads from gene counts. Other procedures may assign them by an explicit rule or allocate fractional weight. These choices are not interchangeable: exclusion yields no contribution, while fractional allocation can contribute to more than one gene.

Strand information can resolve some overlaps. In a stranded assay, the orientation of the read relative to the library's strand convention can help identify which gene is compatible with the observed molecule. In an unstranded assay, or when strand information is unavailable or unreliable, the same overlap may remain ambiguous. The correct strandedness setting depends on how the library was made and how the alignments are represented; it should not be guessed from the gene coordinates alone.

Gene-level assignment is also different from transcript-level assignment. A read can overlap exons shared by several transcripts of the same gene. At gene level, those transcript possibilities still point to one gene, so the read can be assigned to that gene. At transcript level, the read may not identify which isoform produced it. Gene counts therefore do not, by themselves, establish transcript identity or quantify isoform-specific expression.

Worked Example: When Strand Information Resolves an Overlap

Consider a hypothetical unstranded library with four reads overlapping the same genomic interval. The interval is annotated as an exon of gene A on the forward strand and an exon of gene B on the reverse strand. Assume the alignment orientations are consistent with gene A for three reads and gene B for one read, but the library is unstranded, so orientation cannot be used as a reliable expression-strand rule.

Under an unstranded policy that excludes reads overlapping multiple genes, all four reads are ambiguous: the interval overlaps both genes, so A receives 0 of these reads and B receives 0. Under a compatible stranded policy, assuming the library's strand convention is known and correctly applied, the three reads compatible with A can be assigned to A and the one compatible with B to B. The resulting contributions are A = 3 and B = 1.

The arithmetic is simple, but the assumption is decisive. The strand-aware result is justified only if the assay preserves strand information and the orientation convention is set correctly. Applying it to an unstranded library would create unsupported assignments rather than recover known gene origins.

Boundary Overlap and a Formal Counting Rule

For clarity, let \(r\) denote a read or fragment and let \(G_g\) denote the feature used for gene \(g\). Given a particular annotation, overlap threshold, strand rule, and ambiguity policy, define the eligible set \(E(r)\) as the genes whose features meet all assignment requirements for \(r\). Under unique-assignment counting, a read contributes one count to a gene only when \(E(r)\) contains exactly one gene.

$$ C_g = \sum_r \mathbf{1}\{E(r)=\{g\}\} $$

Here \(C_g\) is the read count for gene \(g\), and \(\mathbf{1}\{\cdot\}\) equals 1 when the condition inside braces is true and 0 otherwise. If \(E(r)\) is empty, or contains multiple genes under an exclusion policy, the read contributes zero to every gene.

This expression also shows why unique assignment avoids double-counting a read across genes: for any read, the indicator can equal 1 for at most one gene. A fractional policy would instead define nonnegative weights \(w_{rg}\), with weights summing to at most 1 across genes for each read, and use \(C_g=\sum_r w_{rg}\). Such a result is no longer an integer read count in the usual sense, so the policy should be explicit.

The indicator expression is a bookkeeping description, not a claim that every workflow counts independent reads. In UMI-based assays, assignment and deduplication rules determine how read evidence is converted to molecule counts. When comparing outputs, keep the counting unit fixed and compare the feature-assignment choices separately.

Worked Example: A Read at an Exon Edge

Suppose gene H has an exon from positions 500–549. A hypothetical read aligns to positions 545–564, so 5 aligned bases overlap the exon. Assume the read maps uniquely, has compatible strand, and overlaps no other gene. Compare two stated exon-overlap rules: accept any aligned exonic base, or require at least 10 aligned exonic bases.

Under the any-base rule, the overlap is 5 bases, which is greater than 0, so the read is eligible for H and contributes 1 to its read count. Under the 10-base minimum, the condition is \(5 \geq 10\), which is false, so the read is not assigned to H. The aligned positions are identical in both cases; only the threshold differs.

This example illustrates why a small boundary overlap can produce different counts across methods. It does not establish that one threshold is universally preferable. The threshold is part of the specified counting procedure and should be interpreted alongside the assay and annotation.

Checks, Alternatives, and Limitations

When counts seem unexpectedly low or differ between processing runs, inspect the inputs and rules before interpreting the difference as biological. Useful checks include confirming the annotation version, whether the feature definition is exonic or includes introns, whether strandedness matches the assay, how paired reads and minimum overlap are handled, and whether ambiguous reads are discarded or allocated. Also check that the alignment is splice-aware where appropriate and that the reference and annotation use compatible coordinates.

A sharp change in assigned counts after switching from exon-only to exon-plus-intron features is not automatically an error: the eligible feature space has changed. Conversely, unexpected assignments to a gene may indicate a mismatched strand setting, an overlapping annotation, an overly permissive threshold, or an annotation/reference mismatch. Comparing the number of assigned, ambiguous, and unassigned reads under clearly stated rules can help localize the source of a discrepancy.

ApproachWhat it counts or resolvesMain limitation
Exon-only gene countingReads overlapping a gene's annotated exonsDoes not count reads confined to introns
Exon-plus-intron gene countingExonic reads and reads meeting the intronic inclusion ruleMay include RNA that is not fully spliced; definition varies
Unique assignmentReads with one eligible geneDiscards reads compatible with multiple genes
Fractional allocationDistributes ambiguous evidence across eligible genesProduces weighted rather than ordinary integer read counts
Transcript-level assignmentAttempts to distinguish transcript isoformsShared exons may not identify a unique transcript

No single row is correct for every analysis. Exon-only counting gives a narrower definition of evidence for gene expression, while intron inclusion can retain reads from incompletely spliced RNA. Unique assignment is transparent but can omit evidence in overlapping regions; fractional methods retain some of it but rely on an allocation convention. These are limitations of what the observed reads and annotation can support, not defects that can always be solved by adjusting a threshold.

Common Mistake

Incorrect reasoning: “This read lies near an exon, so it should count for that gene.” Proximity is not the same as feature overlap. A read confined to an intron may be excluded by exon-only counting, and a read that overlaps two genes may be ambiguous even if one seems biologically more plausible.

Correction: Identify the aligned bases, the annotated feature intervals, and the exact overlap and ambiguity rules. Then determine the eligible gene set. Count the read only according to the stated policy; do not assign it by visual closeness or presumed gene of origin.

Key takeaway: A gene-level entry reflects an explicit combination of annotation, exon or intron inclusion, strand handling, overlap threshold, and ambiguity policy. Report and check those choices when interpreting or comparing counts.

Check Your Understanding

Answer each question using the assignment rules stated in it. Solutions follow the questions.

  1. Under exon-only counting, a uniquely aligned read lies wholly inside an annotated intron and overlaps no exon. Does it contribute to a gene count?
  2. A read overlaps two exons that belong to different transcripts of the same gene, and no other gene. Is it necessarily ambiguous at gene level? Why?
  3. A read overlaps exons of two genes. If the counting policy excludes multi-gene reads, what is its contribution to each gene?
  4. A read overlaps 7 exonic bases. Under a minimum-overlap rule of 8 bases, is it assigned, assuming no other issue?
  5. Name two settings that should be checked before comparing gene counts from two processing runs.

Solutions: 1. No; exon-only counting excludes a read with no exonic overlap. 2. No. Both transcript features lead to the same gene, so the read can be uniquely assigned at gene level, though its transcript may remain unresolved. 3. It contributes zero to both genes under the stated exclusion policy. 4. No, because \(7 \geq 8\) is false. 5. Examples include annotation version, intron inclusion, strandedness, overlap threshold, paired-read handling, and the treatment of ambiguous reads.

Clinical Biostats