-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose some bwa indel parameters through the off-target checker. #95
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -159,7 +159,9 @@ def __init__( | |||||||||||||
three_prime_region_length: int, | ||||||||||||||
max_mismatches_in_three_prime_region: int, | ||||||||||||||
max_mismatches: int, | ||||||||||||||
max_amplicon_size: int, | ||||||||||||||
max_gap_opens: int = 0, | ||||||||||||||
max_gap_extends: int = -1, | ||||||||||||||
max_amplicon_size: int = 1000, | ||||||||||||||
min_primer_pair_hits: int = 1, | ||||||||||||||
cache_results: bool = True, | ||||||||||||||
threads: Optional[int] = None, | ||||||||||||||
|
@@ -201,6 +203,12 @@ def __init__( | |||||||||||||
three_prime_region_length | ||||||||||||||
max_mismatches: the maximum number of mismatches allowed in the full length primer | ||||||||||||||
(including any in the three prime region) | ||||||||||||||
max_gap_opens: the maximum number of gaps (insertions or deletions) allowable in an | ||||||||||||||
alignment of a oligo to the reference | ||||||||||||||
max_gap_extends: the maximum number of gap extensions allowed; extending a gap | ||||||||||||||
beyond a single base costs 1 gap extension. Can be set to -1 to allow | ||||||||||||||
unlimited extensions up to max diffs (aka max mismatches), while disallowing | ||||||||||||||
"long gaps". | ||||||||||||||
max_amplicon_size: the maximum amplicon size to consider amplifiable | ||||||||||||||
cache_results: if True, cache results for faster re-querying | ||||||||||||||
threads: the number of threads to use when invoking bwa | ||||||||||||||
|
@@ -220,6 +228,8 @@ def __init__( | |||||||||||||
seed_length=three_prime_region_length, | ||||||||||||||
max_mismatches_in_seed=max_mismatches_in_three_prime_region, | ||||||||||||||
max_mismatches=max_mismatches, | ||||||||||||||
max_gap_opens=max_gap_opens, | ||||||||||||||
max_gap_extensions=max_gap_extends, | ||||||||||||||
Comment on lines
+231
to
+232
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix parameter name inconsistency Parameter names differ between constructor and BWA initialization. - max_gap_extensions=max_gap_extends,
+ max_gap_extends=max_gap_extends, 📝 Committable suggestion
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tfenne I do think we should normalize the parameter names across the two signatures. "max gap extensions" appears more commonly in the repo: prymer/prymer/offtarget/bwa.py Lines 197 to 198 in 385e1b1
|
||||||||||||||
max_hits=max_primer_hits, | ||||||||||||||
) | ||||||||||||||
self._max_primer_hits = max_primer_hits | ||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -222,6 +222,7 @@ def test_map_single_hit( | |||||
max_hits=1, | ||||||
max_mismatches=5, | ||||||
max_gap_opens=1, | ||||||
min_indel_to_end_distance=5, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Value mismatch with PR objective PR states minimum distance should be 3, but test uses 5. - min_indel_to_end_distance=5,
+ min_indel_to_end_distance=3, 📝 Committable suggestion
Suggested change
|
||||||
reverse_complement=reverse_complement, | ||||||
) as bwa: | ||||||
query = Query(bases=bases, id=f"{hit}") | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default
max_gap_opens=0
is too restrictivePR indicates indels affect primer annealing. Consider default of 1 to allow single indels.
📝 Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tfenne any reason why not? Or should we keep this at 0 for backwards compatibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.