fulcrumgenomics / prymer

Python Primer Design Library
https://prymer.readthedocs.io/en/latest/
MIT License
8 stars 0 forks source link

Should `OffTargetDetector.mappings_of()` return a `dict[Primer, BwaResult]` instead of `dict[str, BwaResult]`? #10

Open emmcauley opened 1 month ago

emmcauley commented 1 month ago

Context: OffTargetDetector.mappings_of() currently returns dict[str, BwaResult] where the key is the sequence of bases of the primer. It may be more natural to return the full Primer object as the key instead of just the bases.

msto commented 3 weeks ago

We'll need to make Primer hashable in order to do so (adding eq=True to the dataclass decorator should be sufficient)

tfenne commented 3 weeks ago

This would make a lot of sense to me, since my first question when I looked at that code was "why are we returning a dict keyed on strings instead of primers".