Skip to content
Snippets Groups Projects
Commit 6dd814b1 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix case no interval could be found

parent 232075e8
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,8 @@ class VariantsSimulator:
my_start = min(my_stretch[1], end)
if my_start < end:
intervals.append([my_start, end])
if len(intervals) == 0: # No valid interval found
return 0, 0
intervals.sort(key=lambda x: x[0]-x[1])
return intervals[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment