You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OffTargetDetector._to_amplicons uses itertools.product over the left and right primer hits and evaluates each of them in a loop to identify valid left/right hit combinations for the pair.
Suggestion:
Get hits by primer sequence from mappings_of
Split into left and right hits
Group hits by refname
For each refname, split into left +, right -, left -, right+ hits
Build amplicons from left + and right - (amplicon strand +), left - and right + (amplicon strand -)
Building amplicons - dealing with only positive & negative in correct orientation and known to be on the same reference, with known amplicon strand
itertools.product over positive & negative primer hits
Check product size against min/max amplicon size range
If in range, return the product hit as positive start to negative end with the known reference name and amplicon strand
The text was updated successfully, but these errors were encountered:
I think this sounds like a great idea. I would make a couple of suggestions also:
You could probably do the splitting into left/right/+/- and by refname all in one pass ... if you created a simple dataclass that held four lists (one for each strand and orientation). You could then have a dict[refname, new_class] and place hits into the appropriate place.
If you sort all the sub-collections by start_pos you can short-circuit more, to avoid checking more combinations. I.e. for a given "left" primer you can stop checking "right" primer hits once you get beyond the maximum amplicon size.
OffTargetDetector._to_amplicons
usesitertools.product
over the left and right primer hits and evaluates each of them in a loop to identify valid left/right hit combinations for the pair.Suggestion:
mappings_of
Building amplicons - dealing with only positive & negative in correct orientation and known to be on the same reference, with known amplicon strand
itertools.product
over positive & negative primer hitsThe text was updated successfully, but these errors were encountered: