Skip to content

Commit

Permalink
Fix issue #163 duplicate boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
kaukrise committed Aug 17, 2023
1 parent 8e6f77f commit 68cb7ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -4,6 +4,7 @@
- Fixed issue #136 that prevented the use of -r parameter in fanc insulation
- Added option to ignore sambamba when using sam_sort or auto
- Fixed an issue with Juicer fieles when normalisation info is missing
- Fix issue #163 where boundaries might be reported multiple times in rare cases

0.9.25

Expand Down
1 change: 0 additions & 1 deletion fanc/architecture/domains.py
Expand Up @@ -609,7 +609,6 @@ def from_insulation_score(cls, insulation_score, window_size=None,
minima, scores = peaks.get_maxima()
else:
minima, scores = peaks.get_minima()
#regions = list(insulation_score.regions)

boundaries = []
for i, ix in enumerate(minima):
Expand Down
4 changes: 3 additions & 1 deletion fanc/architecture/maxima_callers.py
Expand Up @@ -14,7 +14,9 @@ def find_zero_crossing(x, sub_bin_precision=False):
frac = left/(left - right)
if sub_bin_precision:
return idx + frac
return np.rint(idx + frac).astype(np.int_)
zero_crossings = np.rint(idx + frac).astype(np.int_)

return np.unique(zero_crossings)


def getitem_interpolated(array, idx):
Expand Down

0 comments on commit 68cb7ae

Please sign in to comment.