Test frameshift, stop-loss, partial and SV effects under non-standard genetic codes

Open
#701 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start by reading the named tests, especially test_sv_sequence_changes.py, test_germline_start_loss.py, and tests/common.py, then trace how transcript genetic codes reach effect classification. Add effect-level cases for frameshifts, stop loss or readthrough, non-identity structural variants, and at least one additional code, comparing expected proteins with the independent Biotite helpers and #700 corrections. Done means each gap is exercised under a code that differs from the standard code and any standard-code fallback is fixed or documented.

Written by the indexing model from the issue text.

Description

Split from #640. #700 checks every supported NCBI code at the table and translation level against an independent source. It covers codon meanings, stops, starts, all 64 codons, every ambiguous IUPAC codon, and alternative starts. This issue is about effect classification under non-standard codes.

Already covered

  • Code 2 point edits on MT-CO1, both annotators: TGA as Trp, AGA as a premature stop, ATA as the reference Met, and a mitochondrial synonymous change. These are in test_mitochondrial.py, test_annotator_divergence_scenarios.py and test_annotator_parity_adversarial.py. Germline-aware classification on chrM is covered too.
  • Dog mitochondrial SNVs (code 2) on a native reference: test_native_animal_structural_mito.py.
  • Initiation and start loss under codes 1, 2 and 3: test_germline_start_loss.py::test_initiation_obeys_genetic_code_without_changing_internal_codons, and test_start_loss_details.py::test_literal_codon_decoding_uses_the_transcripts_genetic_code (StartLoss on MT-CO1).
  • New-ORF discovery under code 2: test_created_orfs.py::test_reference_genetic_code_controls_new_orf_translation.
  • Partial-product and identity SV models on MT-CO1 using the code 2 table: test_sv_sequence_changes.py::test_partial_uses_mitochondrial_table and ::test_mitochondrial_translation_uses_correct_table.

Gaps

  • Frameshifts under any non-standard code. The downstream stop must be found with the transcript's code. For example, code 2 reads TGA as Trp and stops at TAA/TAG/AGA/AGG, so the frameshift product and its length differ from the standard code.
  • Stop loss and readthrough under a non-standard code. The extension must be translated, and its new stop found, with the transcript's code. Code 2's AGA/AGG stops are the natural case.
  • Non-identity structural-variant and composed products whose protein ends in a non-standard-code transcript, for example a local deletion or duplication in an MT gene. Today only the identity segment model is checked.
  • Effect-level tests for codes other than 1, 2 and 3. Each code is now checked as a table by #700, but none is driven through an annotated transcript.
  • Vertebrate mitochondrial exceptions beyond the code 2 table (NCBI's notes for code 2, https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi). Varcode currently models neither, and neither is tested:
    • "Mitochondrial genes in some vertebrate (including humans) have incomplete stop codons ending in U or UA, which become complete termination codons (UAA) upon subsequent polyadenylation" (Hou et al.). This affects stop-loss and readthrough calls near such a stop.
    • "A -1 mitoribosome frameshift occurs at the AGA and AGG codons predicted to terminate the CO1 and ND6 ORFs, and consequently both ORFs terminate in the standard UAG codon" (Temperley et al. 2010). This affects variants at those terminal codons.
    • Decide whether to model each one or to document it as a known limitation, and test whichever is chosen.

Acceptance

  • Each gap is tested under at least one non-standard code where it differs from the standard code.
  • Expected proteins come from an independent translation (the Biotite helpers in tests/common.py, with #700's gc.prt corrections), not from Varcode.
  • Any place that silently falls back to the standard code is fixed or documented.
Dominant language
Python
Stars
88
Forks
28
Avg merge
4h 47m
Merged PRs (30d)
55

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openvax/varcode

All issues in openvax/varcode

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.