fulcrumgenomics / prymer

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

Update `build_primer_pairs()` to accept `Iterable[Oligo]` or `Sequence[Oligo]` #84

Open msto opened 17 hours ago

msto commented 17 hours ago

I have a use case where I have subclassed Oligo in order to store QC attributes (e.g. hairpin delta G and off-target hit counts) and filter individual primers before assembling them into pairs.

Because list is invariant, the current implementation does not support building pairs from subclasses of Oligo.

Note that the implementation prior to #75 supported this use case because the arguments were defined as Iterable[Oligo].

msto commented 17 hours ago

https://mypy.readthedocs.io/en/stable/common_issues.html#variance