Commit 2741fa71 authored by Assaf Gordon's avatar Assaf Gordon
Browse files

WindowMaker: fix bug with fixed number of windows.

an extra window was printed if the interval size evenly divided by the window size.
parent dff512dc
......@@ -96,7 +96,7 @@ void WindowMaker::MakeFixedCountWindow(const BED& interval) {
return;
uint32_t i=1;
for (uint32_t start = interval.start; start <= interval.end; start += window_size, ++i) {
for (uint32_t start = interval.start; start < interval.end; start += window_size, ++i) {
string name = GenerateID(interval,i);
uint32_t end = min(start + window_size,interval.end);
cout << interval.chrom << "\t" << start << "\t" << end << name << endl;
......
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