Commit aee2a33d authored by Mathieu Giraud's avatar Mathieu Giraud

core/windowExtractor.cpp: allows up to two 5-bp shifts

See #2987. With the standard parameters, his allow to gain 5 or 10bp
on the other side.
parent 45e3bba4
......@@ -242,7 +242,7 @@ pair<int, int> WindowExtractor::get_best_length_shifts(size_t read_length,
best_length = best_length / shift * shift;
list<int> shifts {-1, 1};
list<int> shifts {-1, 1, -2, 2};
for (int current_shift : shifts) { // -1 will be a left shift
int shifted_constraint_left = constraint_left + current_shift * shift * 2;
int shifted_constraint_right = constraint_right - current_shift * shift * 2;
......
......@@ -151,7 +151,7 @@ class WindowExtractor {
* @param central_pos: start position of the second half of the window
* @param shift: length of the shift
* @return a pair (length, shift) giving the first window that fits at the central_pos
* (possibly shifted, as mentionned by shift) of the given length.
* (possibly shifted at most twice, as mentionned by shift) of the given length.
* shift == 0 iff length == max_window_length.
* In case of an odd window length, we assume that the second half of the
* window, starting at central_pos, is the longest.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment