Skip to content

Commit

Permalink
Fixed bug with fend bin mids sitting on bin boundary causing incorrec…
Browse files Browse the repository at this point in the history
…t bin count.
  • Loading branch information
msauria committed Nov 30, 2017
1 parent add963b commit 0f5a482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hifive/quasar.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def _normalize(self, chrom, raw, mids, binsize):
width = 100
# convert into square matrix
start = (mids[0] / binsize) * binsize
stop = ((mids[-1] - 1) / binsize + 1) * binsize
stop = ((mids[-1]) / binsize + 1) * binsize
N = ((stop - start) / binsize).astype(numpy.int64)
mapping = (mids - start) / binsize
data = numpy.bincount(mapping[raw[:, 0]] * N + mapping[raw[:, 1]], minlength=(N * N),
Expand Down

0 comments on commit 0f5a482

Please sign in to comment.