Skip to content

Commit 68af043

Browse files
Should not crash when no long arm detected
1 parent 9ee717e commit 68af043

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/scripts/rdna_scaff_functions.py

+2
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ def get_best_path(short_id, path_container, paths, longarm_to_component, multipl
376376
best_arms.sort(key=lambda x: path_scores[x], reverse=True)
377377
if len(best_arms) == 1:
378378
return best_arms[0]
379+
if len(best_arms) == 0:
380+
return "Unclear"
379381
background_score = get_background_score(paths.getPathById(short_id), weights_map, G)
380382
if path_scores[best_arms[0]] - (path_length(path_container[best_arms[0]], G) * background_score) < 2 * (path_scores[best_arms[1]] - path_length(path_container[best_arms[1]], G) * background_score):
381383
print (f"No evident majority, best options are {best_arms[0]} and {best_arms[1]}, checking further")

0 commit comments

Comments
 (0)