openvax / openvax/varcode

Make `priority` a computed property of effects

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

Nobody has claimed this yet.

Dominant language
Python
Stars
87
Forks
28
Avg merge
3h 27m
Merged PRs (30d)
27

Description

Currently all the effects have to statically sorted by their class in EffectOrdering, which leads to an artificial proliferation of overlapping effect classes like Substitution, Insertion, Deletion, ComplexSubstitution. Really, all of those should be specific run-time instantiations of a single Substitution effect. To give single residue substitutions a lower priority then e.g. deletions, we should have a dynamic effect priority like:

def priority(self):
    flags = [
        self.changes_protein_length(),
        self.predictable_coding_effect()   
        self.overlaps_transcript()
        self.overlaps_gene(),
    ]
    total = 0
    for i, flag in enumerate(flags):
        total += 2 ** i * flag
    return total

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading EffectOrdering and the existing Substitution, Insertion, Deletion, and ComplexSubstitution effects. Trace how their class-based ordering is applied, then verify that runtime priority produces the intended ordering for effects with different protein-length, coding, transcript, and gene impacts. Done means the overlapping effect classes can be represented by a single Substitution effect without losing ordering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.