Make `priority` a computed property of effects
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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