Skip to content

Commit

Permalink
fix: improve consequence predictions (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil authored Feb 25, 2025
1 parent ef37197 commit 73d0fd3
Show file tree
Hide file tree
Showing 11 changed files with 314 additions and 202 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ enumflags2 = { version = "0.7.11", features = ["serde"] }
env_logger = "0.11"
flate2 = "1.1"
futures = "0.3"
hgvs = "0.18.0"
hgvs = "0.18.1"
indexmap = { version = "2.7", features = ["serde"] }
itertools = "0.14"
jsonl = "4.0"
Expand Down
5 changes: 4 additions & 1 deletion openapi.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: MIT
identifier: MIT
version: 0.30.1
version: 0.31.0
paths:
/api/v1/genes/transcripts:
get:
Expand Down Expand Up @@ -412,6 +412,8 @@ components:
- splice_donor_variant
- stop_gained
- frameshift_variant
- frameshift_elongation
- frameshift_truncation
- stop_lost
- start_lost
- transcript_amplification
Expand All @@ -423,6 +425,7 @@ components:
- conservative_inframe_deletion
- missense_variant
- rare_amino_acid_variant
- protein_altering_variant
- splice_donor_5th_base_variant
- splice_region_variant
- splice_donor_region_variant
Expand Down
18 changes: 14 additions & 4 deletions src/annotate/seqvars/ann.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ pub enum Consequence {
/// SO:frameshift_variant, VEP:frameshift_variant
FrameshiftVariant,

/// "A frameshift variant that causes the translational reading frame to be extended relative to the reference feature."
/// SO:frameshift_elongation
FrameshiftElongation,

/// "A frameshift variant that causes the translational reading frame to be shortened relative to the reference feature."
/// SO:frameshift_truncation
FrameshiftTruncation,

/// "A sequence variant where at least one base of the terminator codon (stop) is changed, resulting in an elongated transcript."
/// SO:stop_lost, VEP:stop_lost
StopLost,
Expand Down Expand Up @@ -131,10 +139,9 @@ pub enum Consequence {
/// SO:rare_amino_acid_variant
RareAminoAcidVariant,

// Not used by mehari, but by VEP (we're usually more specific)
// /// "A sequence_variant which is predicted to change the protein encoded in the coding sequence."
// /// SO:protein_altering_variant, VEP:missense_variant
// ProteinAlteringVariant,
/// "A sequence_variant which is predicted to change the protein encoded in the coding sequence."
/// SO:protein_altering_variant, VEP:missense_variant
ProteinAlteringVariant,

// low impact
/// "A sequence variant that causes a change at the 5th base pair after the start of the intron in the orientation of the transcript."
Expand Down Expand Up @@ -284,6 +291,8 @@ impl From<Consequence> for PutativeImpact {
| SpliceDonorVariant
| StopGained
| FrameshiftVariant
| FrameshiftElongation
| FrameshiftTruncation
| StopLost
| StartLost
| TranscriptAmplification
Expand All @@ -293,6 +302,7 @@ impl From<Consequence> for PutativeImpact {
| DisruptiveInframeDeletion
| ConservativeInframeInsertion
| ConservativeInframeDeletion
| ProteinAlteringVariant
| MissenseVariant
| RareAminoAcidVariant => PutativeImpact::Moderate,
SpliceDonorFifthBaseVariant
Expand Down
Loading

0 comments on commit 73d0fd3

Please sign in to comment.