Loss status classification - hillerlab/TOGA2 GitHub Wiki
Tip
If you’re looking for a color/RGB code reference for gene loss categories, go to Loss status visualising in the genome browser
The loss status provides information about the intactness of the reading frame and is inferred at the level of projections, transcripts and genes, as follows.
- Query projections are classified at the
alignmentstep based on the profile of gene-inactivating mutations (frameshifting deletions and insertions, stop codon mutations, exon deletions, disruption of the splice site dinucleotides) and coding sequence similarity statistics. Exon presence is inferred by sequence identity to the reference, whether the exon sequence aligns in the genome alignment chain, and SpliceAI splice site scores. - Reference transcripts are classified at the
loss_summarystep based on the loss statuses of all their orthologous projections in the query. The highest loss status of all orthologous projections is estimated based on the loss status precedence order (see below) and assigned to the reference transcript. - Reference genes are handled similar to reference transcripts; their loss status is the highest loss status of their transcripts. To enable gene-level loss analysis, you must provide reference gene-to-transcripts mapping file (
--isoform_file)
Note
If --isoform_file is not provided, gene-level loss classification does not appear in the final results at all. If your reference organism is known not to employ alternative splicing and has a perfect 1:1 gene-to-transcript correspondence, you can treat transcript level loss classification as that of gene level.
Note
While listing loss statuses for reference genes, TOGA2 does not explicitly infer loss status for query genes. However, you can deduce query gene loss status either from their name prefixes (see Query projection & gene notation) or by checking the loss statuses of the respective projections.
TOGA2 uses six different loss statuses, reflecting reading frame intactness and assembly completeness, and the degree of confidence.
- Fully Intact (FI). This status is new in TOGA2 and indicates that the projection has a completely intact reading frame, without any inactivating mutations.
- Intact (I). This status refers to projections where the middle 80% of the CDS is present (not missing sequence) and lacks inactivating mutation. However, mutations can be present in the N- or C-terminal 10% of the reading frame, and potentially indicate alterations in the proteins termini.
- Partially Intact (PI). For such projections, at least 50% of the CDS is present and the middle 80% of the CDS lacks inactivating mutations. The difference to Intact is that some parts of the CDS are missing from the assembly (potentially due to assembly gaps). These projections often encode functional proteins, but the evidence is weaker.
- Uncertain Loss (UL). This status indicates the presence of at least one mutation that is treated as an inactivating mutation; however, evidence is not strong enough to infer that projection can no longer encode a functional protein. The word “uncertain" reflects that such projections may represent (i) early stages of a transcript loss (where not enough inactivating mutations have accumulated), (ii) rare base errors in the assembly (false mutations), or (iii) conserved genes, where individual exons are no longer conserved or mis-predicted by TOGA2.
- Lost (L). This status indicates that there is strong evidence that the projection can no longer encode a functional protein. Loss is typically inferred by the presence of several inactivating mutations affecting at least two exons or extensive sequence deletions. The exon lengths are taken into account in cases where a single exon covers a substantial part (≥40%) of the CDS. To infer the loss status, TOGA2 implements a similar but updated and improved logic as TOGA1.
- Missing (M). Projections for which less than 50% of the CDS is present and the middle 80% of the CDS lack inactivating mutations. For such projections, there is currently no evidence for loss; however, the uncertainty is higher as more than half of the CDS is missing. Note that Missing transcripts can also arise if there is no genome alignment chain that spans the transcript.
The following two statuses reflect orthology instead of reading frame intactness. These categories are specifically reserved for the projection level.
- ParaloGous (PG). Special category for projections classified as paralogous by TOGA2’s machine learning classifier. Paralogous projections are only retained if the respective query locus does not have an orthologous projection. PG projections get their reading frame intactness status (1-6) just like orthologous projections.
- Processed Pseudogene (PP). A new status in TOGA2 that refers to projections classified as processed pseudogene copies. These projections tend to have deletions of introns (arising from reverse transcription of spliced mRNAs). In case, processed pseudogene projections overlap orthologous or PG projections at a query locus, they are ignored. If a PP projection encodes an intact reading frame (FI or I), it can be annotated as a retrogene candidate.
The last status does not reflect either reading frame preservation nor orthology and serves as placeholder for discarded items.
- Undefined (N). Items (projections, reference transcripts, reference genes) discarded for purely technical reasons, usually prior to orthology classification step. Examples for this category are: frameshifted reference transcripts in the input annotation (CESAR cannot deal with them); chimeric projections overlapping two non-overlapping projections of the same transcript; and reference genes which have all their transcripts/projections discarded for technical reasons.
Note
Original TOGA had Partially Missing (PM) loss category for mutation-affected transcripts with more than 50% of the CDS missing in the query. This category was removed in TOGA2 due to ambiguity of interpretation; items previously classified as PM get either UL or M category in TOGA2, depending on sequence presence and intactness.
The loss status of Projections is inferred right after the CESAR2 alignment step. Loss status assignment depends on the following:
- exon presence: how many exons are classified as Present, Missing, or Deleted, and how large the fraction of each exon presence class is compared to the exon number in the reference;
- coding sequence intactness: how many codons of the reference transcript are present in the query and lack inactivating mutations; see Computing CDS integrity statistics for a more detailed explanation;
- inactivating mutations profile: which mutations the projection has, what they are and where in the coding sequence they are located.
Projection loss classification logic is summarized in the following flowchart. When interpreting loss status of individual projections, we suggest that you refer to this flowchart and the feature explanation below.
Abbreviations: CDS - Coding sequence. See below for detailed explanation of classification features.
Each exon annotated by CESAR2 gets one of the following categories based on their alignment similarity to the reference counterpart, coincidence with the chain-predicted location, and SpliceAI support:
- Present (I*): Exons for which the CESAR2 annotation is considered trustworthy. To be considered Present, annotated exon must fulfill at least one of the following requirements:
- Overlap its alignment chain-defined locus (if it exists) by at least one base;
- Has nucleotide identity to the reference exon of at least 45% and a Blosum score of translated sequence of at least 20%
- Has both of its splice sites supported by a SpliceAI probability of threshold value or higher (0.02 by default); for terminal (first or last) exons, only their single splice site is evaluated.
- Missing (M): Exons which do not meet any of the criteria above and either lie outside of the chain boundaries or have assembly gaps in their search space. Exons whose alignments have 90% percent or more comprised by ambiguous symbols (“N”, which is typically used to indicate assembly gaps) also fall in this category regardless of them meeting the requirements above.
- Deleted (D): Exons that do not meet any of the requirements for Present exons and do not qualify as Missing.
Important
*for historical reasons, Present exons are sometimes referred to as Intact, hence the abbreviation. The name Intact is deprecated since Present exons can still harbour inactivating mutations or have low identity to reference.
Missing and Deleted exons are considered absent from the projection and are not reported in the final annotation files, such as query_annotation.bed, query_annotation.with_utrs.bed, and BigBed files. Missing and Deleted exon statuses are considered inactivating mutation events (see below); respective mutation entries appear in the inactivating_mutations.tsv file.
Individual exons comprising ≥40% of the CDS in the reference transcript are referred to as “large" exons. Large exons are given a higher weight as they make up a large fraction of the transcript. E.g. deletion of such an exon is sufficient for a projection to be considered Lost (see below).
For more information on how exons are annotated in TOGA2, how alignment similarity to reference transcript is estimated, and how exon presence is inferred, consult the Exon annotation page.
The presence of inactivating mutations indicates that the transcript may not longer encode a functional protein. Full information on inactivating mutation calling, classification, and severity assessment (‘masking’) can be found in the respective manual page. Details on ORF integrity statistics are described here.
TOGA2 generally considers frameshifting deletions and insertions, stop codon mutations, exon deletions, and disruption of the splice site dinucleotides as inactivating. However, under certain conditions, the effect of mutations is likely less severe. Such mutations are referred to as masked inactivating mutations and are not used to infer L or UL status. Masked mutations include:
- Mutations located in the first (N-terminal) 10% of reference CDS only if there is an alternative inframe start codon in the query within the same first 10% of the sequence, where translation could start. Downstream translation initiation at the nearby start codon can produce a functional protein, albeit with a truncated N-terminus.
- Alternatively, if
--mask_n_terminal_mutations/-m10mflag is set, mutations in the first 10% of reference CDS are masked regardless of the alternative start codon presence.
- Alternatively, if
- Mutations located in the last (C-terminal) 10% of reference CDS. While such mutations may affect the protein’s C-terminus, the gene is often conserved; note that this masking scenario does not require setting the
-m10mflag. - Two or more frameshifts that together compensate each other (return to the reference reading frame) without leading to a stop codon in the region affected by the shifted frame.
- Whole exon deletions which do not shift the reading frame; this includes multiple exon deletions if their cumulative length does not lead to a frameshift. This masking reason is derived from the observation that conserved genes may have ≥1 frame-preserving exon deletion(s).
- Inframe stop codons in the query that correspond to a stop codon present in the reference transcript. Such stop codons can encode selenocysteine or be read-through stops.
- Non-canonical splice sites dinucleotides for known U12 introns, because beyond AT-AC or GT-AG splice site dinucleotides, U12 introns allow for a large variety of other dinucleotides.
- Non-canonical splice sites dinucleotides for known U2 introns that have non-canonical splice sites in the reference (such as TG acceptors).
- Certain mutation types, for example, missing start and stop codons, are considered less severe and are masked by default.
In addition to criteria above, TOGA2 also calculates a list of features to assess coding sequence preservation in the query with regard to the reference CDS. See Computing CDS integrity statistics for detailed explanation.
-
Fully Intact (FI): These projections lack any inactivating mutation and all exons are present. They also do not contain masked mutations. Consequently, projections that would otherwise meet these criteria but exhibit a missing stop codon or a C-terminal mutation are classified as Intact instead of Fully Intact. The only events allowed in such projections are
- Non-canonical splice site dinucleotides in introns corresponding to U12 or non-canonical U2 introns in the reference;
- Precise deletions of reference introns or SpliceAI-supported new introns in the query;
- SpliceAI-supported splice site shifts;
- Larger (≥30 bp) frame-preserving insertions and deletions.
- Intact: These projections have no inactivating mutations in the middle 80% of the CDS, and this region is present without missing sequence. Inactivating mutations and missing sequence can be present in the N- or C-terminal 10% of the reading frame.
- Partially Intact: As for Intact projections, they have no inactivating mutations in the middle 80% of the CDS. Furthermore, at least 50% of the CDS is present without missing sequence.
- Missing: As for Partially Intact projections, they have no inactivating mutations in the middle 80% of the CDS, but less than 50% of the CDS is present.
-
Loss: These projections typically contain at least two inactivating mutations in the middle 80% of the CDS.
- Single-exon transcripts are classified as Lost if they contain two or more inactivating mutations and the longest intact codon streak is shorter than 60% of the reference CDS.
- Multi-exon transcripts are classified as Lost when the number of non-Missing* coding exons affected by at least one mutation meets or exceeds a transcript-length–dependent threshold.
- If the transcript has ≤ 10 non-Missing coding exons, it is classified as Lost if at least two exons are mutated.
- If the transcript has > 10 non-Missing coding exons, it is classified as Lost ≥20% of the non-Missing exons are mutated. For example, a 20 non-Missing exon transcript is classified as Lost, if ≥ 4 exons are mutated.
- Irrespective of the exon number, if a multi-exon transcript contains a large exon (≥40% of reference CDS), it is classified as Lost if a large exon is Deleted or contains at least two inactivating mutations.
- In case ≥65% of the transcript are deleted by framepreserving deletions, we also classify it is as Lost, irrespective of the exon number.
- Likewise, if the longest non-deleted sequence (see Computing CDS integrity statistics) comprises <20% of the reference CDS, we classify the projection as Lost irrespective of the exon number.
- TOGA2 improves upon TOGA1 in distinguishing Lost from Uncertain Loss projections as follows. We noticed that several Uncertain Loss projections have exactly one inactivating mutation in the middle 80% of the CDS, but additionally contain masked mutations, such as N- or C-terminal mutations or compensating frameshifts. Imagine two transcripts, where one has a single 1bp frameshifting deletion in the middle 80%, and the other one having the same frameshift and an additional N-terminal masked stop codon mutation. Evidence for Loss is stronger for the latter transcript (having two mutations); however, because TOGA1 always ignored masked mutations, both would be classified as Uncertain Loss. Another observed scenario is that the second transcript additionally has a pair of compensating frameshifts (e.g. a +1 insertion and a -1 deletion). TOGA2 improves that by considering the following masked mutations for distinguishing Loss from Uncertain Loss, if the projection has at least one inactivating mutation in the middle 80% of the CDS:
- Mutations located in the first (N-terminal) or last (C-terminal) 10% of reference CDS;
- Two or more frameshifts that together compensate each other.
- Uncertain Loss: These projections typically contain at least one inactivating mutations in the middle 80% of the CDS, but do not fulfill the Loss criteria above. These transcripts often have only one inactivating mutations if the transcript has a single exon or ≤10 exons, or <20% of the exons are mutated.
Important
*Subtracting Missing exons from the number of reference coding exons cannot reclassify multi-exon transcript as single exon one. For example, if a projection of a five-exon transcript has four of its exons Missing, the threshold for classifying it as Lost is still two or more affected exons, not two mutations in the same exon.
In case a reference transcript does not have any orthologous predictions, paralogous chains are used for annotation, if the query locus does not overlap an orthologous projection from another transcript/gene. Paralogous projections are classified as orthologous projections. If they are classified as FI, I, PI, or UL, the query locus likely contains a gene; TOGA2 is just not certain what the ortholog is. However, if a paralogous projection gets Lost or Missing status, TOGA2 assigns them a special loss status: ParaloGous (PG). For paralogous projections with FI, I, PI, or UL status, the suffix #paralog is added to their names (see Query projection & gene notation for more details on projection names and suffixes).
As in the case of paralogous projections, processed pseudogene projections have a special loss status substituting for Lost and Missing statuses: Processed Pseudogene (PP). This means that paralogous projections in the annotation files can have FI, I, PI, UL, and PP statuses only.
Processed pseudogene projections with FI and I loss statuses are referred to as retrogene candidates, highlighting their potential to encode a protein if transcribed. Retrogenes do not form a separate loss class and are treated as regular processed pseudogene projections when assessing transcript- and gene-level loss statistics, as described below; however, they appear in the final annotation files and are considered for query gene inference, marked with the special #retro suffix in their names (see Query projection & gene notation for more details on projection names and suffixes).
Each loss status is represented by its own colour in the genome browser. Following the BED file format, projection loss status colors are encoded as RGB values in column 9 of all projection-containing BED files (e.g., query_annotation.bed, query_annotation.with_utrs.bed, and UCSC browser track BigBed files).
| Loss status | Abbreviation | Color | Color RGB |
|---|---|---|---|
| Fully Intact | FI | Navy blue | 0,0,100 |
| Intact | I | Blue | 0,0,200 |
| Partially Intact | PI | Cyan blue | 0,200,255 |
| Uncertain Loss | UL | Salmon | 255,160,120 |
| Lost | L | Red | 255,50,50 |
| Missing | M | Grey | 130,130,130 |
| Paralogous | PG | Brown | 159,129,112 |
| Processed Pseudogene | PP | Pink | 250,50,200 |
| Undefined | N | NA* | NA* |
*Undefined projections do not appear in the final results, including browser files.
Tip
RGB colors for projections are contained in field 9 of BED12 annotation files and can be used for quick selection of projection entries of desired loss statuses. For example, if you want to get BED12 records for FI and I projections with consulting with the loss_summary.tsv file, you might do the following:
awk -F'\t' '$9 == "0,0,100" || $9 == "0,0,200"' query_annotation.bedTo classify transcripts, all its projections are considered and the highest observed loss status is taken, according to the following precedence order:
FI > I > PI > UL > L > M > (PG, PP) > N
In practical terms, this means that a transcript is classified as intact if it has at least one intact projection. A transcript is classified as lost only if all of its projections are lost. In this example,
PROJECTION ENST00000221307.13#CYP4F3#250 UL
PROJECTION ENST00000221307.13#CYP4F3#151 FI
PROJECTION ENST00000221307.13#CYP4F3#2458 FI
PROJECTION ENST00000221307.13#CYP4F3#1560 UL
PROJECTION ENST00000221307.13#CYP4F3#7039 UL
TRANSCRIPT ENST00000221307.13#CYP4F3 FI
transcript ENST00000221307.13 has FI projections, hence the transcript is classified as Fully Intact, despite the presence of other projections (to other query loci via other chains) that are UL. To classify a gene, TOGA2 employs the same logic considering all its transcripts:
TRANSCRIPT ENST00000221307.13#CYP4F3 L
TRANSCRIPT NM_001199209.2#CYP4F3 FI
GENE CYP4F3 FI
These rules apply to all transcripts and genes in the reference annotation, with the few notable exceptions. In these cases, the algorithm above does not apply due to the projections’ orthology status or because their classification requires alternative status precedence order.
Chains that span a transcript without aligning any of the coding bases are referred to as spanning chains. In the genome browser, spanning chains look as unaligned (double line) or deleted (single line) regions, both referred to as chain gaps, spanning over the coding sequence flanked by the aligned blocks up- and downsteam of the transcript. Spanning chains indicate the failure to align the gene locus to the query assembly, indicating chromosome rearrangements, query assembly gaps, high sequence divergence, or entire locus deletion in the query. Because spanning chains do not contain any intronic or flanking intergenic alignments, TOGA2 cannot use its machine learning classifier to infer orthology for those transcripts/genes that only have one or more spanning chains. If the transcript has a single spanning chain, TOGA2 assumes that this is the ortholog. If the transcript has >1 spanning chains, TOGA2 compares the length of the chain gaps. The spanning chain having the shortest chain gap overlapping the transcript is considered to be its orthologous spanning chain.
An example of spanning chains used for transcript loss classification. Of the two spanning chains, the red one gets preference for loss classification due to the shorter length of the alignment gap spanning over the reference transcript. Depending on whether the unaligned sequence in the query contains an assembly gap, the reference transcript is then classified as either Missing or Lost.
To distinguish between Lost and Missing, TOGA2 considers the chain gap that overlaps the focal transcript:
- If the query sequence corresponding to the chain gap contains an assembly gap (long streak of “N” symbols), the transcript is classified as Missing because the transcript can often be found after closing the assembly gap.
- Otherwise, the transcript is classified as Lost, because it is entirely deleted or diverged beyond our ability to detect any remnants even with the sensitive alignment parameters we use for the chains.
If a transcript does not have any orthologous chains (aligning or spanning), paralogous chains are used for annotation. Sometimes these chains might represent actual orthologs misclassified by TOGA2; however, since their actual orthology is not supported by the classifier, their assigned loss statuses cannot represent the actual loss status. Transcripts and genes annotated with paralogous projections only get the PG status no matter what loss statuses were assigned to the respective projections. Projections annotated via paralogous chains are generally considered less reliable predictions. During query gene inference step, if a paralogous projection overlaps an orthologous projection of another transcript by at least one coding base, it is removed from the annotation (see Query projection & gene notation for more information). Since transcripts annotated with paralogous projections have no orthologous chains by definition, if such a transcript has all of its paralogous projections removed from the annotation, it does not have any representation in the query annotation. Such transcripts get the Missing loss status, which can be propagate to gene level if all transcripts of a gene have their paralogous projections removed.
It is conceivable that a reference gene, whose ortholog is classified as lost, has a retrogene candidate (defined as a processed pseudogene that is FI or I). TOGA2 does not ‘rescue’ or overwrite the loss status of the ortholog by the presence of the retrogene candidate, because most processed pseudogenes and retrogenes are not transcribed. However, we acknowledge the possibility that the loss of a gene could be compensated by an expressed retrogene that takes over its function.