Commit c883d994 authored by Martin Larralde's avatar Martin Larralde
Browse files

Fix random behaviour caused by occasional out-of-bound access while in meta mode

parent e08f5014
......@@ -4358,7 +4358,7 @@ cdef class OrfFinder:
nodes._record_overlapping_starts(tinf, True, self.max_overlap)
ipath = nodes._dynamic_programming(tinf, scorer, final=True)
# update genes if the current bin had a better score
if nodes.length > 0 and nodes.nodes[ipath].score > max_score:
if nodes.length > 0 and ipath >= 0 and nodes.nodes[ipath].score > max_score:
# record best phase and score
max_phase = i
max_score = nodes.nodes[ipath].score
Supports Markdown
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