Inactivating mutations - hillerlab/TOGA2 GitHub Wiki
- Masked and inactivating mutations
- Mutation data in the output files
- Frame-shifting insertions and deletions
- Premature stop codons (nonsense mutations)
- Splice site mutations
- Big insertions and deletions
- Missing start codon
- Missing stop codon
- Missing and deleted exons
- Reference-absent introns
During the alignment step, TOGA2 checks the annotated projection sequences for potential gene-inactivating mutations. The number, location, and profile of the annotated mutations impact the projection loss status classification, which, in its turn, affects the transcript- and gene loss analysis, query gene inference, and orthology relationship resolution at the latter TOGA2 steps.
While all the mutation events recorded during the alignment step are colloquially referred to as inactivating, their actual impact on gene integrity may vary, also depending on their location in the coding sequence: a frameshift or premature stop codon in the middle of the gene severely truncates the protein, whereas a frameshift or stop codon situated close to the end of the coding sequence just affects the C-terminus.
To reflect the difference in mutation effect on gene function, TOGA2 uses the concept of “masked mutations”, which are considered to have a less pronounced or nonexistent effect on gene integrity, and can be completely ignored or treated more leniently during gene loss classification. Mutations that are not masked are considered as potentially gene- inactivating mutations.
Common reasons for mutation masking include:
- Mutations located in the first (N-terminal) 10% of the reference CDS, provided an alternative start codon is present. In this case, TOGA2 assumes that translation starts from the downstream start codon, resulting in a functional protein, albeit with a truncated N-terminus. The alternative start codon must lie in the same first 10% of the coding sequence and be in the same reading frame as the original reference start codon.
- The requirement for the presence of an alternative start codon for N-terminal mutations can be lifted by setting the
--mask_n_terminal_mutation/-m10mflag. In this case, all mutations in the N-terminal 10% of the CDS are masked.
- The requirement for the presence of an alternative start codon for N-terminal mutations can be lifted by setting the
- Mutations located in the last (C-terminal) 10% of the reference CDS. Masking N- and C-terminal mutations is based on the observation that frameshifts and premature stop codons in conserved human-mouse orthologs are heavily biased toward the first and last 10% of the CDS.
- Mutations located in exons classified as Missing or Deleted in the query. Note that the exon absence itself is still considered an inactivating mutation event (see below).
The following mutations or events are always masked and ignored when inferring the projection loss status:
- Non-canonical splice site dinucleotides (e.g., differing from GT/GC consensus for the donor site and the AG consensus dinucleotide for the acceptor site) if the respective counterpart in the reference is a U12 or a non-canonical U2 intron;
- Precise intron deletions in the query;
- Reference-absent introns annotated using SpliceAI predictions;
- Splice site shifts inferred from SpliceAI probabilities;
- Big (≥50 bases) insertions and deletions, including those introduced by SpliceAI-supported splice site correction;
- Frame-shifting indels introduced during the SpliceAI-supported splice site correction, and frame-shifts in the original CESAR2 alignment compensated by these indels.
Information on mutations and events found in the annotated projections is stored in the inactivating_mutations.tsv file, a tab-delimited table file with the following columns:
-
projection: projection name; -
exon: affected exon number with respect to the reference exon-intron structure; -
triplet: number of the triplet (three consecutive symbols in the query) where the mutation occurred. If a mutation affects multiple triplets, the value contains the first and the last triplet numbers separated by underscore. -
ref_codon: reference codon number corresponding to the affected query codon. If a mutation affects multiple reference codons, the value contains the first and the last codon numbers separated by underscore. -
chrom: name of the query chromosome (contig, scaffold, etc.) where the mutation occurred; -
start: mutation start coordinate in the query; -
end: mutation end coordinate in the query; -
type: mutation type identifier-
FS_INSfor frame-shifting insertions; -
FS_DELfor frame-shifting deletions; -
SSMDfor donor splice site mutations; -
SSMAfor acceptor splice site mutations; - <...>
-
-
description: a brief description of the mutation event; -
is_masked: set toMASKEDfor masked mutations,NOT_MASKEDfor inactivating ones; -
masking_reason: if mutation is masked, contains a brief explanation for masking, otherwise a single dash (“-“); -
mut_id: an internal mutation identifier.
Warning
As of version v2.0.8, for fragmented projections, the first field currently states only a single chain identifier corresponding to the fragment in which the mutation occurs.
## entries for projection XM_011511769.3#RGPD6#4039,772:
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
XM_011524058.3#USP6#955358 7 193 181 chr7 141187827 141187828 FS_INS 1 MASKED Exon is missing ?FS_1
XM_011524058.3#USP6#955358 9 266 242 chr7 141188343 141188344 FS_INS 1 MASKED Exon is deleted FS_2
XM_011524058.3#USP6#955358 11 339 302 chr7 141189338 141189339 FS_DEL -1 NOT_MASKED - ?FS_3
XM_011524058.3#USP6#864 12 346 309 chr11 141189358 141189359 FS_DEL -2 MASKED Exon is missing FS_4
XM_011524058.3#USP6#864 12 382 344 chr11 85032116 85032117 FS_DEL -1 MASKED Exon is missing FS_5
XM_011524058.3#USP6#864 13 508 469 chr11 85031669 85031670 FS_DEL -2 MASKED Exon is missing FS_6
The TOGA2-generated BigBed file for the query genome browser annotation track contains information for an SVG plot visualising the reference transcript’s exon-intron structure together with the position of mutations in the query. This plot is shown when clicking on an annotated transcript in the query browser.
Mutation plots for fragmented projections are split into chain-wise subplots, each depicting the exons aligned via the respective chain:

Inactivating mutations are shown at the reference codon position. Masked mutations are plotted in pale grey. Inactivating (non-masked) mutations are plotted in red (for frame-shifting indels and splice site mutations) or black (for premature stop codons). Compensating frame-shifts are connected with green arcs.

Tip
If you need the SVG source for a specific projection, you can retrieve it directly from the track BigBed file, column 31, and save it as an SVG file:
``
bigBedToBed {toga_output_dir}/ucsc_browser_files/{prefix}.bb stdout |
awk -F'\t' '($1 == "your_favourite_projection"){print $31}'
TOGA2 also produces a separate file with decorators that can be added to the main TOGA2 BigBed browser track and visualises point mutations. The colour notation corresponds to that in the mutation files:
- inactivating mutations are coloured deep red (RGB 198,0,9);
- masked mutations are coloured pale grey (RGB 211,211,211)
The following glyph shapes are used to indicate specific mutation types (see respective mutation sections below for examples):
- triangle: frame-shifting deletions
- inverted triangle: frame-shifting insertions
- five-pointed star: premature stop codons
- square: splice site mutations
Insertions and deletions (indels) that are not divisible by three shift and thereby disrupt the reading frame in the query sequence. Frame-shifting indels are inferred from the CESAR2 alignments:
## frame-shifting insertion: alignment gap in the reference indivisible by three
ref ATG TC-T TAG
query ATG TCTG TAG
## frame-shifting deletion: alignment gap in the query indivisible by three
ref ATG TCT TAG
query ATG T-T TAG
In the inactivating_mutations.tsv file, frame-shifting indel entries have the following properties:
- the description column contains the size of the frame-shifting indel in nucleotides; the values are positive for insertion events (e.g., 1) or negative for deletion events (e.g., -1)
- in the
mut_idcolumn, mutation identifiers have the FS_ followed by the number of the frame-shifting mutation in the query
In the mutation plots, frame-shifting insertions are indicated by inverted triangles pointing at the insertion, and frame-shifting deletions are represented as vertical red lines. Indel size in nucleotides is shown above the symbol. Masked frameshifts are colored grey:

In the browser decorator tracks, frame-shifting indels are represented by triangle glyphs, upward for deletions and inverted for insertions:

Two or more frameshifts compensate each other if their cumulative length is zero or divisible by three and if the region in between them is translatable in the alternative frame (meaning it contains no stop codons). Because such compensating frameshifts can provide novel sequence in an otherwise intact gene (Biba et al., 2022), TOGA2 masks compensating frameshifts and does not treat them as inactivating mutations. However, compensating frameshifts can also be an indication of gene loss, when they occur together with other inactivating mutations, or nearly the entire gene is translated in a different reading frame.
Compensation events inferred by TOGA2 can include any number of insertions and deletions, except for whole exon deletions. They may lie in arbitrary distance from each other and can be located in different query sequence exons. Toy examples illustrating compensating frameshifts:
## compensated frameshift example 1:
## two deletion events with total deletion length of -3
ref ATG TGT GCC AGT TCA TAA
query ATG TGC -CC GAT --A TAA
query* ATG TGC CCG ATA TAA
## compensated frameshift example 2:
## two indel events, an insertion and a deletion, with a total indel length of zero
ref ATG TGT GCC AGT TC-A TAA
query ATG TGC -CC GAT TCGA TAA
query* ATG TGC CCG ATT CGA TAA
Notably, if a stop codon is found in the shifted frame between two compensating frameshift candidates, the mutations are not compensating and TOGA2 treats them as inactivating, as exemplified here:
## a false compensation candidate example:
## an alternative frame fragment between the two frame-shifts
## contains an in-frame TAA stop codon (lowercase symbols)
ref ATG TGT GCC AGT TCA- TAA
query ATG TG- Gta aGT TCCA TAA
query* ATG TGG taa GTT CCA TAA
Because compensating frameshifts can also be an indication of gene loss, TOGA2 considers them when for the gene loss classification in two scenarios:
- If a query sequence contains non-masked inactivating mutations, such as non-masked frame-shifts, in-frame stop codons, splice site mutations, or frame-shifting exon deletions, any compensating frame-shifts are unmasked and treated as regular inactivating mutations. The rationale for this is that the more frameshifts occurred, the higher is the chance that some of them will compensate each other. Unmasked compensating frameshifts are shown in red font; however, the compensating events are still reported in the mutation files and mutation plots.
- Otherwise, the deleterious effect of alternative frame fragments is assessed at the coding sequence integrity level, where alternative frame codons are counted as Deleted towards certain integrity features’ computation.
In the inactivating_mutations.tsv file, compensating frameshifts have the MASKED label in the 10th column, with the masking_reason field set to Compensated. The compensation event entries have the following properties:
- the
typefield contains the COMPENSATION label - the
descriptionfield contains the mutation identifiers of the first and the last frame-shift event participating in the alternative frame, e.g.,FS_1-3 - the
is_maskedfield is set toNOT_MASKEDby default to comply with the TOGA1 notation - ff frame-shifts participating in the alternative frame formation were unmasked (see above), the
masking_reasonfield contains theTreated as inactivatingdescription; otherwise, the field contains a single dash - the
mut_idvalue contains aC_prefix followed by the compensation number in the projection
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
XM_047442600.1#CCNB3#26 4 112 112 chrX 7020022 7020023 COMPENSATION FS_1-2 NOT_MASKED - C_1
XM_047418797.1#AFDN#3362 31 1881 1717 chr17 13975473 13975474 COMPENSATION FS_18-19 NOT_MASKED Treated as inactivating C_1
In the mutation plots, compensation events are represented in grey font connected by green arcs:

Compensating frameshifts are not represented in the genome browser decoration tracks.
Mutations that create premature stop codons (TAA, TAG, and TGA) lead to a truncated protein.
## in-frame stop codon mutation: a single-base substitution in codon leads
## to a premature TGA stop codon emergence in the query reading frame
## asterisk ('*') indicates translation stop
ref ATG CGA GGT AAC TGA
M R G N *
query ATG TGA GGT AAC TGA
M * G N *
In the inactivating_mutations.tsv file, premature stop codons have the following properties:
- label
STOPin the type column - the reference codon to query stop codon transition in the description column
- a
STOP_prefix in the mutation identifier in themut_idcolumn
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
NM_001256580.2#RPL10#286934 2 8 8 chr11 53366336 53366337 STOP TGT->TAG NOT_MASKED - STOP_1
In the mutation plots, premature stop codons are represented by a single vertical line, with the stop codon sequence shown above:

In the browser decorator tracks, premature stop codons are represented by a star glyph:

In addition to the general masking scenarios listed above, stop codons in the query are also masked if they correspond to in-frame stop codons already present in the reference sequence, where such codons can encode the 21st amino acid selenocysteine or translational stop codon readthrough events. TOGA2 masks all in-frame stop codons in the reference sequence beforehand with the NNN symbols, allowing CESAR2 to align them to stop codons in the query. Afterwards, any stop codons in the query aligned to NNN reference codons are not considered to be inactivating and are not listed in the inactivating mutation file. Instead, their sequences and coordinates are reported in the selenocysteine_codons.tsv file in the meta folder. We note that TOGA2 cannot distinguish between selenocysteine codons and stop codon readthrough.
U2-type introns typically have donor (5’) splice sites with a consensus GT or GC dinucleotide and acceptor (3’) splice sites with a consensus AG dinucleotide. TOGA2 generally considers non-consensus dinucleotide variants as splice site mutations, as such mutations typically disrupt splicing and may lead to non-functional proteins.
In the inactivating_mutations.tsv file, splice site mutations have the following features:
- the
typecolumn is set to eitherSSMAfor acceptor site mutations orSSMDfor donor site mutations - likewise, the
mut_idcolumn identifiers start withSSMA_for acceptor sites orSSMD_for donor sites - the
descriptioncolumn contains reference and query splice site dinucleotides, separated by an arrow symbol:ag->gg
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
ENST00000222286.9#GAPDHS#343523 6 186 181 chr12 71846964 71846966 SSMA ag->gg NOT_MASKED - SSMA_3
NM_001037738.3#NPM1#172142 5 166 153 chr17 68699825 68699827 SSMD gt->aa NOT_MASKED - SSMD_4
In the mutation plots, splice site mutations are represented by splice site dinucleotide labels, written in lowercase, next to the respective intron-exon boundaries:

In the UCSC decorator track, splice site mutations are represented with squares at the respective intron-exon boundaries:

Splice site mutations are masked in the following cases:
- Reference introns classified as U12 or non-canonical U2 can have non-GT/GC donors and non-AG acceptors with a large variety of dinucleotides. Since the intron type is often conserved, TOGA2 allows any dinucleotide to occur at such splice sites without considering them as inactivating. Such splice sites are reported in the mutation file as MASKED with the U12 intron masking reason for the reference U12 introns and Non-canonical U2 intron for non-canonical U2 introns, respectively.
- Precise intron deletions in the query result in deleted splice site dinucleotides, but because the entire intron is deleted, such events are not considered as inactivating mutations. The events are reported in the mutation file, with
Intron deletionas masking reason. - The splice site nucleotide contains non-standard nucleotide symbol(s). In the most common case, such exons lie directly adjacent to an assembly gap consisting of “N” symbols. The respective splice site mutations have Ambiguous symbol in the masking reason column.
- Splice site dinucleotide lies outside of the alignment search space. Whenever possible, search spaces provided to CESAR2 contain enough context for splice site shift search. It is still possible, however, that CESAR2 aligns the exon directly adjacent to the query search space boundary, such that the full splice site dinucleotide cannot be inferred from the CESAR2 input sequence. Such mutations have the Insufficient data masking reason and question marks (“?”) for missing dinucleotide symbols in the description column:
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
XM_047439131.1#ZNF492#522783 2 12 12 chr13 67825716 67825718 SSMA ag->?? MASKED Insufficient data SSMA_1
- In addition, all general masking scenarios (N- and C-terminal 10% of the sequence, missing and deleted exons, etc.) also apply to splice site mutations.
Large framepreserving indels can have a significant effect on the protein function. TOGA2 considers frame-preserving indels of 50 nucleotides (~17 codons) or larger as “big” indels.
In the mutation file, big indels have:
-
BIG_INS(for insertions) or BIG_DEL (for deletions) in the type column -
BI_prefix to their identifiers in themut_idcolumn - indel size (+{number} for insertions and -{number} for deletions) in the
descriptioncolumn
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
XM_047418795.1#AFDN#3362 17_17 828_863 728_728 chr17_chr17 14054109 14054214 BIG_INS +105 MASKED - BI_1
XM_047418795.1#AFDN#3362 29_29 1615_1635 1440_1460 chr17_chr17 13999007 13999009 BIG_DEL -60 MASKED - BI_2
Big indels are not reflected in the mutation plots or decorator tracks, but entire exon deletions are shown in the mutation plots.
Because large length variations have been observed in conserved genes, all big indel mutations are masked by default and are not considered when classifying projections as FI. However, they might have a significant impact on the coding sequence integrity properties.Because large length variations have been observed in conserved genes, all big indel mutations are masked by default and are not considered when classifying projections as FI. However, they might have a significant impact on the coding sequence integrity properties.
By default, coding sequences are expected to start with a methionine start codon (ATG). If a reference transcript starts with ATG but the query projection contains a different codon or has its start codon deleted, TOGA2 reports a missing start codon mutation.
In the mutation file, missing start codon mutations have:
-
START_MISSINGin thetypecolumn -
ATG->{query_codon}in the description column, where {query_codon} is the codon found in the query; deleted start codons are reported as triple dash ("---") -
START_1identifier in themut_idcolumn
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
NM_001165881.3#ZNF268#36274 1 1 1 chr2 176073672 176073673 START_MISSING ATG->NNN MASKED Missing start masked START_1
Because missing start codons may be caused by imprecise first exon annotation, especially in the case of short terminal coding exons, and rare cases of alternative start codons are known, TOGA2 does not consider missing start codon mutations as inactivating and masks them by default. Notably, projections with a missing start codon cannot be classified as FI in terms of loss status.
To account for conserved non-ATG start codons, if the reference transcript starts with a codon other than ATG, TOGA2 does not report missing start codon mutation in the query.
TOGA2 recognises the three stop codons in the eukaryotic nuclear genetic code (TAA, TAG, TGA), and reports a mutation event if an annotated query sequence does not end with any of those. In the mutation file, missing stop codon entries have the following properties:
-
STOP_MISSINGlabel in the type column -
{ref_codon}->{query_codon}label in the description column; deleted stop codons are reported as triple dash ("---") -
STOP_LOSS_1tag in themut_idcolumn
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
ENST00000398612.3#ZNF596#347684 5 514 505 chr9 20347539 20347540 STOP_MISSING TAA->--- MASKED Missing stop masked STOP_LOSS_1
All missing stop codon mutations are masked by default and not considered to be inactivating, because it is possible that the missing stop codon occurs downstream of the provided sequence search space. Notably, projections with a missing start codon cannot be classified as FI in terms of loss status.
To account for incompletely annotated reference transcripts, if a reference transcript does not end with a known stop codon, the stop loss mutation is still reported with the following description: Non-canonical stop in reference. These mutations are ignored for the purpose of FI projection classification.
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
ENST00000377032.5#IGKV1D-12#17234 2 124 117 chr6 69927614 69927615 STOP_MISSING CCT->TCT MASKED Non-canonical stop in reference STOP_LOSS_1
TOGA2 classifies exon candidates into three categories:
- Present: exon annotations considered trustworthy and satisfying at least one of the following criteria:
- Overlaps its alignment chain-defined locus (if it exists) by at least one base;
- Has nucleotide identity to the reference exon of ≥45% and a Blosum score of the translated sequence of ≥20% (these parameters separate real from random alignments very well)
- Has both of its splice sites supported by a SpliceAI probability at or above the threshold value (0.02 by default); for terminal (first or last) exons, only their single splice site is evaluated.
- Missing: Exons not satisfying any of the criteria above and either falling outside of the alignment chain’s span or having an assembly gap in their search space. Such cases often arise from genome assembly incompleteness.
- Deleted: The remaining exons are classified as deleted and not satisfying any of the criteria for the two categories above. These exons are considered to be truly absent in the query.
Missing and Deleted exon categories are treated as mutation events, affecting the loss status of the projections. Masked exon deletions (see below) still affect the classification, preventing projections from being assigned the Fully Intact status.
Missing exons affect the loss status classification by introducing the Missing (M) codons to the codon profile during the coding sequence integrity estimation. Missing exon events are never masked, and they do not trigger compensated frame-shift unmasking.
Missing exon entries have the following properties:
-
Missing exonlabel in thetypecolumn - Empty description (“-") in the
descriptioncolumn -
MIS_identifier prefix in themut_idcolumn
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
XM_047418795.1#AFDN#3362 1 1_41 1_36 chr17 14142367 14142430 Missing exon - NOT_MASKED - MIS_1
In the mutation plots, missing exon blocks are coloured grey:

Because missing exons are not annotated, they do not appear in the BED files, the BigBed browser track, and the browser decorator files.
Unlike Missing exons, exons classified as Deleted are assumed to be absent in the query genome. The impact of exon deletion on the projection loss status varies depending on its effect on the query reading frame:
- The deletion of one or more consecutive exons shifts the reading frame if their cumulative length is not divisible by three or if their deletion leads to a new in-frame stop codon between the neighbouring Present exons; such exon deletions are treated as inactivating mutations:
## case 1: exon deletion introduces a frame shift
sequence ATG G | TT ACT AGC | TCA TGA
exon num 1 | 2 | 3
presence I | D | I
resulting sequence: ATG G-- TCA TGA
## case 2: exon deletion introduces a premature stop codon (TGA)
sequence ATG T | TT ACT AGC G| AG TCA TGA
exon num 1 | 2 | 3
presence I | D | I
resulting sequence: ATG TAG TCA TGA
- The deletion of one or more consecutive exons is frame-preserving if the cumulative exon length is divisible by three and the deletion does not lead to a split stop codon emergence. Frame-preserving exon deletions are masked.
## case 1: a single exon deletion that does not affect the frame
sequence ATG G | TT ACT A | GC TCA TGA
exon num 1 | 2 | 3
presence I | D | I
resulting sequence: ATG GGC TCA TGA
## case 2: two neighbouring exons
## while none of them meets the requirements above,
## their simultaneous deletion does not shift the reading frame
sequence ATG G | TT ACT AGC | CCA G | CT TCA TGA
exon num 1 | 2 | 3 | 4
presence I | D | D | I
resulting sequence: ATG GCT TCA TGA
Deleted exon entries have the following properties:
- Deleted exon label in the
typecolumn - Empty description - in the
descriptioncolumn -
DEL_identifier prefix in theDEL_column -
MASKEDlabel in the is_masked column if the deletion is frame-preserving,NOT_MASKEDotherwise
projection exon triplet ref_codon chrom start end type description is_masked masking_reason mut_id
XM_047418795.1#AFDN#3362 32 2008_2043 1821_1849 chr17 13973405 13973490 Deleted exon - NOT_MASKED - DEL_1
ENST00000421025.3#ZNF679#422068 1 1_18 1_14 chr7 42825399 42825450 Deleted exon - MASKED Frame-preserving deletion DEL_1
Frame-preserving deleted exons are colored blue in the mutation plots, and frame-shifting deleted exons are coloured red:

Because deleted exons are not annotated, they do not appear in the BED files, the BigBed browser tracks, and the decorator tracks.
Introns that are absent in the reference and annotated in the query with the help of SpliceAI do not count as inactivating mutations and do not count towards projection loss classification. Because such events indicate evolutionary exon-intron structure changes, TOGA2 reports them in the inactivating_mutations.tsv file with the following distinct features:
- column 2 (
exon) contains the number of the reference exon in which the reference-absent intron was annotated; -
INTRON_GAINlabel in thetypecolumn; - single dash (“-") in the
descriptionfield - reference-absent intron entries are always
MASKED, with theIntron gain maskedreason in themasking_reasonfield
Reference-absent introns do not appear in the mutation plots. In the BED files and genome browser tracks, they appear as regular introns.
Note
The query coordinates of reference-absent introns are stored in the mutation file. For other annotated reference-absent introns’ features, such as SpliceAI support of intron boundaries and mutation/big indel support in the CESAR2 alignment, see the gained_intron_summary.tsv file in the meta directory.