TL;DR
My last post described a universal grammar for integrating different types and descriptions of DNA variants (“Occam’s Variant Grammar”).
In this post, I expand Occam’s Variant Grammar to also represent RNA variants, enabling DNA-RNA integration and amino-acid level traceability essential for telling which parts of a protein are tumor-specific (and can safely be targeted).
This abstraction is embodied in a new tool called Exacto, which identifies somatic and germline DNA variants, RNA variants, integrates DNA and RNA evidence, and characterizes mutant peptide sequences with each amino acid traced to its RNA and DNA origins. Exacto is available here: https://github.com/pirl-unc/exacto
1. Previously On “A Unifying Grammar for DNA Variants”
In my earlier post, I proposed a new variant grammar that conceptualizes DNA variant types in a variation graph. The Occam’s Variant Grammar unifies representation of major DNA variant types using just two atomic operations: add and connect. It simplifies the growing list of DNA variant types into just two graph operations (upstream or downstream) on a variation graph.
2. Lost in Translation
In the context of neoantigen discovery for personalized immunotherapy development, simply knowing which DNA variants are present is not enough. It is equally critical to identify RNA variants, determine whether they incorporate or arise from DNA alterations, and predict mutant peptide sequences while contextualizing the underlying RNA and DNA changes.
However, we see a fragmentation of computational methods for identifying variants at each level of the central dogma. Developers often focus their new software on identifying a subset of major variant types. Some tools are limited to detecting small variants such as SNVs, insertions, and deletions typically smaller than 30 base-pairs (bp). Others only profile larger (30bp+) structural variants. Layered on top of this is the further divide between tools that identify DNA variants and those that characterize RNA variants. These compartmentalizations typically arise as a by-product of the historical limitations inherent in different sequencing technologies and specialization of lab expertise.
While computational methods for DNA variant detection have matured over the past two decades, RNA variant detection remains relatively underdeveloped. This is largely due to the complexity introduced by splicing and the limitations of short-read sequencing technologies. Compounding the challenge is our incomplete understanding of the splicing process itself. One of the most advanced splicing prediction models to date, SpliceAI, remains a black-box model.
Long-read RNA characterization tools such as FLAIR and SQANTI only focus on identifying RNA variants, especially splicing aberrations and not sequence variants (e.g. SNVs, insertions, deletions, and breakpoints). They also do not integrate RNA variants with DNA variants either. Their outputs and usefulness have functional limitations when you try to apply them in the personalized immunotherapy development setting. A common roadblock in their outputs is, so what are all the underlying characteristics of the variant transcript as they relate to a mutant peptide sequence?
As the conventional wisdom goes, many a times “the whole is more than the sum of its parts.” That is, to know what an elephant is, one ought to see the whole elephant. Then, the functions of the trunk, leg, and ear make sense in the context of the entire system. We want to make it make sense - a simple yet powerful adage that my advisors Ben and Alex have instilled in our lab.
Personalized immunotherapy targets, or neoantigens, are tumor-specific to selectively eliminate cancer cells while minimizing autoimmune responses, thereby optimizing therapeutic efficacy. In the Make it Make Sense framework, this means that each neoantigen sequence should be traceable to a tumor RNA variant and, in turn, back to a somatic tumor DNA variant, with compelling evidence established at every level. It follows that a computational tool that accomplishes this inherently integrates data across the DNA, RNA, and peptide levels.
While tools such as RegTools, NeoDisc, and moPepGen predict mutant proteoform sequences by DNA and RNA variant integration, they were designed for short-read sequencing data. They focus on small DNA variants and do not take advantage of long-read sequencing technologies. Most importantly, they do not annotate how each amino acid in each proteoform was affected by the underlying DNA and RNA variant nucleotides. Moreover, short-read RNA sequencing cannot be reliably used to resolve splicing complexities and is prone to generating false positive peptide sequences.
All in all, fragmentation of variant types in variant calling together with a dependence on short-read data may be leading to loss of clinically significant translational information.
3. Found in Full with Long-read Sequencing
It is important to highlight that our lab’s direction and attempt to increase the sensitivity in mutant peptide sequence prediction for personalized immunotherapy development is fundamentally enabled by long-read sequencing. In particular, the high fidelity full-length isoform sequencing made possible by Pacific Biosciences enables an unprecedented capability to sequence most mammalian messenger RNA (mRNA) molecules end-to-end; I do not have any conflict of interest. Indeed, it is still the case that very long genes such as TTN (over 100,000 nucleotides long) cannot be fully captured at high (over 99%) base accuracy rates. Nevertheless, most mRNAs in the human transcriptome can be profiled end-to-end using the latest long-read isoform sequencing that can generate reads over 15,000-bp in length (Figure 1). This means that we can read the full length of a mutant messenger RNA that originates from one or more somatic DNA variants.
Compared to short-read sequencing, long-read sequencing provides two major advantages - one at the genome level and the other at the transcriptome level.
First, at the genome level, long-read sequencing enables the accurate resolution of both small and structural variants - think of a 500-bp insertion. While earlier studies, such as that by Choo et al. suggested that many large structural variants could be identified using short reads, their evaluation used a generous threshold. If a short-read derived variant call landed within 1,000 bp of the ground truth location, it was considered a match. That may be sufficient to detect the presence of a large structural variant, but personalized immunotherapy requires much more. We need to pinpoint the exact breakpoints, where a variant begins and ends, so that we can infer its consequences at the amino acid level. It’s one to thing to know that something exists. It’s another to know exactly what it is.
Second, at the transcript level, long-read sequencing enables precise assembly of transcript models. Transcriptome assembly using short reads typically generates a complex graph that generates false positive transcripts. Long-read sequencing, on the other hand, gives you readouts of the same isoform multiple times end-to-end. This reduces ambiguity around alternative splicing and enables RNA variant calling to be anchored by a more accurately observed transcript. Furthermore, having an accurate, observed transcript allows for direct comparison against known reference transcripts. This is an essential step for annotating where RNA variants begin and end so that each mutant amino acid can be traced back to each RNA codon as well as to each DNA nucleotide.
All in all, this is what long-read DNA and RNA sequencing enable us to do:
Of note, the central dogma above isn’t unique to immunogenomics. It is a guiding principle across genomics as a whole.
4. Occam’s Variant Grammar for RNA Variants
To make sense of RNA variants in the context of DNA variants, we turn back to the Occam’s Variant Grammar. Here, I expand it to allow for representation of RNA variants:
An RNA variant can be described as:
where:
Variant Node
A variant node can either be an empty sequence (i.e. deletion) or an insertion sequence (i.e. single-nucleotide variant, multi-nucleotide variant, or insertion).
Graph Operations (Edge Orientations and Flag Types)
Similar to the DNA variant, connections between a new RNA variant node and the reference genome backbone can be made by the following orientations:
Upstream (towards 5’ end in the coding sense of the messenger RNA)
Downstream (towards 3’ end in the coding sense of the messenger RNA)
Reference positions can be flagged to indicate splice aberrations. A flag can be one of the following types (Figure 2):
Include
Include the reference position; intron retention or cryptic exons.Mark
Mark the reference position; non-canonical splice site.
Skip
Skip the reference position; exon skipping or truncation.
Note that both Include and Skip flags inherently indicate non-canonical splicing.
Just like a DNA variant, an RNA variant can be encoded as:
rna_variant = {
chromosome_1: <reference chromosome>,
position_1: <reference position>,
operation_1: <downstream, upstream, include, mark, OR skip>,
chromosome_2: <reference chromosome>,
position_2: <reference position>,
operation_2: <downstream, upstream, include, mark, OR skip>,
sequence: <variant sequence>
}where sequence represents the variant node while operation_1 and operation_2 represent the edge types (upstream or downstream) or flag types (include, mark, or skip). The reference positions denote where the edges should be created on the reference genome backbone OR the start and end of flagged reference positions.
Here’s a graphical overview of how this variant grammar allows us to represent the following major RNA variant types:
Circular RNA
Cryptic exon
Deletion
Duplication
Exon truncation or skipping
Fusion gene (two or more known genes)
Insertion
Intergenic RNA
Intron retention
Inversion
Single-nucleotide variant
Multi-nucleotide variant
Translocation
Note that the representation for deletion, duplication, insertion, inversion, SNV (including A-to-I RNA editing), and translocation are the same as those described in an earlier blog post. Here, we define any combination of the above RNA variant types to be characteristic of a novel, or more accurately, variant transcript.
Here are the RNA variant types represented in the Occam’s Variant Grammar (Figure 3).
5. Exacto Performs DNA and RNA Variant Calling and Integration
Exacto (EXacto Accurate Characterization of Transcriptomes and genOmes) identifies genomic and transcriptomic variants from reference-aligned long-read DNA and RNA sequences.
It performs five main tasks using long-read sequencing data:
Identification of germline and somatic (case-specific) DNA variants.
Identification of RNA variants.
Integration of DNA and RNA variants.
Translation of full-length RNA sequences.
Tracing of each in silico translated amino acid to its RNA and DNA origins.
It is available here on GitHub: https://github.com/pirl-unc/exacto
DNA Variant Calling
The unified DNA and RNA variant grammar structure, that is the Occam’s Variant Grammar, drives the variant identification algorithm at the genomic and transcriptomic levels. The core parts of Exacto are written in Rust for speed.
Exacto parses the alignment map information such as CIGAR as well as CS and SA (Supplementary Alignment) tags to detect variant records. The variant records are subsequently clustered using union-find to identify variant calls (Figure 4).
Prior to variant calling, Exacto creates an alignment structure for each read. This is an important preprocessing step as I’ve noticed that the following occasionally happens in alignment, leading to missed detection of insertions (Figure 5).
To resolve such cases where there are overlapping alignments or unaligned sequences, Exacto first builds an alignment structure for each long read. That is, Exacto collects all alignment records for each read from the Binary Alignment Map (BAM) file and then creates a map between each nucleotide in the original sequencing read and each nucleotide in the reference genome. This is a crucial preprocessing step as it enables us to identify otherwise hidden insertions between breakpoints - viral integrations for example.
RNA Variant Calling
RNA variant types are more complex than DNA variant types. While DNA variant types can be inferred directly from the alignment data (i.e. SNVs, insertions, deletions, and breakpoints), RNA variant calling requires an additional step of comparing alignments against reference transcript models. This added complexity arises because DNA is transcribed and spliced to produce RNA molecules. A single DNA region can generate multiple distinct transcripts through alternative splicing and introduce variation that does not exist at the DNA level.
It is important to highlight that splicing “aberrations” can only be identified by interpreting a putative transcript in the context of known reference transcripts. For example, suppose we have three reference transcripts from the same gene and one assembled transcript (Figure 6). Applying Occam’s razor (principle of parsimony) we might conclude that the assembled transcript most closely resembles reference transcript 3 with a truncation in its second exon.
It is important to identify a matched reference transcript because just pooling all canonical splicing sites does not lead to an accurate characterization of the variant transcript. Consider the following example (Figure 7):
While the assembled transcript is different from all three reference transcripts, all of its splice sites (A, B, and C) are found among the pooled set of reference splice sites. It is possible that its second, third, or fourth exon may have originated from reference transcript 2, reference transcript 1, or reference transcript 3, respectively. If aberrant splicing identification only relied on splice sites absent in the pooled set of reference splice sites, the assembled transcript would not be detected as a variant transcript.
There are several ways to compare an assembled transcript against a set of reference transcripts. Here are some approaches that I’ve tested:
where:
When I simulated GENCODE v41 (hg38) protein-coding transcripts with RNA degradation towards the 5’ end, here are the benchmark results I got for the above approaches:
Exacto takes as input a FASTA file of assembled transcripts to identify RNA variants. This design choice was made due to variations in RNA alignments that result from RNA degradation - typically towards the 5’ end of the RNA molecule for polyA tail capture kits.
Exacto applies the same the same variant calling algorithm used for DNA variant calling to detect SNVs, MNVs, insertions, duplications, deletions, and inversions for RNA variant calling. Additionally, it performs splice-aware variant calling by comparing alignments against reference transcripts to identify the following splicing aberrations:
Circular RNA
Cryptic exon
Exon truncation or skipping
Fusion gene
Intergenic RNA
Intron retention
By default, Exacto selects the top 3 reference transcripts for each assembled transcript based on cosine similarity scores.
DNA and RNA Variant Integration
Exacto is designed to identify mutant peptides that result from genomically templated somatic variants. Recall that subsequences of mutant peptides could be loaded on major histocompatibility (MHC) class I molecules, making neoantigens that could be personalized immunotherapy targets. An essential step in this task is inferring which RNA variants, if any, were generated as a result of a somatic DNA variant. At first, this problem might appear to be a splicing prediction problem. Given altered and unaltered DNA sequences, predict differences in their splicing behaviors. However, while splicing prediction tools such as SpliceAI could help to increase our confidence in pairing an RNA variant with a somatic DNA variant, they are not robust in oncology as proteins comprising spliceosomes could themselves be mutated and affect splicing patterns.
In the personalized immunotherapy development setting, we often have both the DNA and RNA sequencing data of the tumor. This allows us to computationally observe any splicing aberrations in close proximity to somatic DNA variants. In fact, the Griffith Lab published RegTools in the past to solve this problem with short read sequencing data.
Here, we extend the idea of genomic distance proximity from RegTools for DNA and RNA variant integration and apply it with advantages offered by long-read sequencing, namely the ability to sequence RNA molecules end-to-end and phase all variants in the sequenced transcript.
Recall that Exacto identifies variants in assembled transcripts. This allows us to work with transcript models, most of which are captured in their full lengths.
Transcript Structure Encoding
A major advantage of identifying RNA variants on assembled transcripts is the ability to contextualize the variants within transcript models.
The proposed Transcript Structure encoding represents the following:
The encoding is a combination of transcript bases and events between two bases.
An assembled transcript is compared against a set of reference transcripts and any variations between the two are encoded.
Each transcript structure annotates each base and any event between two bases.
Conceptually, the encoding retains the reference genome-level comparison features of the cs tag and adds reference transcript-aware annotations. This is a necessary extension for accurate downstream in silico translation at single amino-acid resolution.
An important aspect of the proposed encoding is that it is generated by directly comparing the assembled transcript to a set of reference transcripts (in cases of a fusion gene). Pooling splicing and exonic regions from multiple reference transcripts within the alignment scope can create a false impression of canonical splicing due to overlapping features from alternative isoforms. A one-to-one comparison with a specific reference transcript is therefore essential for accurately identifying mutant peptide sequences.
The Transcript Structure is comprised of 2 types of information:
Transcript model base: a base in an assembled transcript.
Transcript model event: an event (e.g. breakpoint, deletion, or splicing) between two bases in an assembled transcript.
Transcript Model Base Kind
A transcript model base is one of the following kinds:
Match: A transcript model base is of the match kind if it matches a base in the reference genome.
Mismatch: A transcript model base is of the mismatch kind if it is a different allele from the reference at the aligned position.
Insertion: A transcript model base is of the insertion kind if it is part of an insertion based on alignment to a reference genome. Soft-clipped bases without supplementary alignments are also considered insertion bases.
Unaligned: A transcript model base is of the unaligned kind if it is not aligned to any part of a reference genome.
Transcript Model Base Context
A transcript model base is one of the following contexts:
Exonic: A transcript model base is of the exonic context if it aligns to an exonic base position of a reference transcript. Bases in the untranslated regions (UTR) are also considered exonic bases.
Intronic: A transcript model base is of the intronic context if it aligns to an intronic base position of a reference transcript.
Intergenic: A transcript model base is of the intergenic context if it aligns to a position in the reference genome that falls outside all annotated genic regions.
Transcript Model Event Kind
A transcript model event is one of the following kinds:
Breakpoint: A transcript model event is of the breakpoint kind when a supplementary alignment exists between two transcript model bases. If the two bases are not directly adjacent, transcript model bases between the two are considered insertion bases.
Deletion: A transcript model event is of the deletion kind if a genomic deletion exists between two transcript model bases.
Splicing: A transcript model event is of the splicing kind if two transcript model bases are separated by an intronic region containing a pair of splice sites.
Boundary: A transcript model event is of the boundary kind when it occurs at either end of a transcript model (i.e. the first or last transcript model base). Boundary events capture exon truncation or skipping beyond the 5’ or 3’ ends of the transcript model (i.e. think of omitted exons in the 5’ end of a transcript model with 5’ RNA degradation).
Transcript Model Event Context
A transcript model event is one of the following contexts:
Canonical Splicing: A transcript model event is of the canonical splicing context if both the donor and the acceptor sites match a known pair of splice sites in the corresponding reference transcript.
Non-canonical Splicing: A transcript model event is of the non-canonical splicing context if either the donor or the acceptor site does not match any known pair of splice sites in the corresponding reference transcript.
Backsplicing: A transcript model event is of the backsplicing context if a breakpoint event loops back to a previously traversed reference base, causing the same genomic position to be covered multiple times. To distinguish this from a duplication event, upstream and downstream exons must be skipped or truncated.
Fusion Gene: A transcript model event is of the fusion gene context when the two bases flanking the event, of either the breakpoint or splicing kind, align to genic regions of different genes.
Transcript Structure Examples
Here are some of the RNA variant types represented in the Transcript Structure tag:
Single-nucleotide Variant

Insertion

Deletion

Cryptic Exon

Exon Truncation / Skipping

Intron Retention

Fusion Gene


Primary Structure Encoding
Finally, to predict a neoantigen sequence we would take the window of a mutant peptide sequence that includes the underlying RNA variants. The Transcript Structure information can be translated in silico while keeping track of any RNA variants. This allows us to encode a primary structure with each amino acid traceable to an RNA variant.
For example, the SNV (ATGCTTGGCCCATTTCCAGACGA) example above would be translated as:
amino_acid|codon|start:end|indices
M|ATG|0:2|0
L|CTT|3:5|0
event=1 <-- canonical splicing
G|GGC|6:8|2
P|CCA|9:11|2,3 <-- SNV
F|TTT|12:14|4
P|CCA|15:17|4
event=5
D|GAC|18:20|6The exon truncation (ATGCTTGGCCCCTTTGACGA) example above would be translated as:
amino_acid|start:end|base_indices
M|ATG|0:2|0
L|CTT|3:5|0
event=1 <-- canonical splicing
G|GGC|6:8|2
P|CCC|9:11|2
F|TTT|12:14|2
event=3 <-- non-canonical splicing
D|GAC|15:17|46. Closing
In the next blog post, I will present simulated benchmark study results on DNA and RNA variant calling as well as predicted mutant peptide sequences in real-world samples found by Exacto and other methods.
7. Acknowledgement
This work was made possible through the generous support of the Jaime Leandro Foundation, a non-profit foundation committed to brining therapeutic cancer vaccines to patients.

















