Define an effect-property ranking policy beyond dynamic priority_class delegation

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

Current status (2026-10-26)

Ranking is no longer entirely fixed by the concrete effect class. effect_priority accepts dynamic priority_class, and wrapper/outcome effects derive their ranking from contained/reference consequences while preserving the original candidate set. The final severity ordering still uses the class-priority table; distinct public substitution/insertion/deletion consequence types remain.

The residual request is an explicit ranking policy based on effect properties, not merely adding a computed property or replacing all public effect classes with one class. Specify its behavior for changed/unchanged/unresolved proteins, alternative outcomes, partial observations and legacy custom priorities. Severity, probability and RNA support must remain distinguishable.

Acceptance: demonstrate the intended ordering on existing regression examples and uncertain candidate sets; preserve alternative outcomes and backwards-compatible effect types/serialization; document any changed top-effect selection. A ranking-policy refactor should not silently redefine scientific consequence classes.

Original request

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
Dominant language
Python
Stars
88
Forks
28
Avg merge
4h 44m
Merged PRs (30d)
54

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.