diff --git a/big_scape/comparison/lcs.py b/big_scape/comparison/lcs.py index 492e52b6..adb4a199 100644 --- a/big_scape/comparison/lcs.py +++ b/big_scape/comparison/lcs.py @@ -287,9 +287,10 @@ def find_domain_lcs_region( # Length - # clear the list if it's not empty and the current match is longer + # clear the lists if it's not empty and the current match is longer if len(use_longest_list) > 0 and length > use_longest_list[0][1]: use_longest_list.clear() + use_central_list.clear() # add the match to the list if it's empty or the current match is equal length # or longer than the existing match @@ -523,9 +524,10 @@ def find_domain_lcs_protocluster( # Length - # clear the list if it's not empty and the current match is longer + # clear the lists if it's not empty and the current match is longer if len(use_longest_list) > 0 and length > use_longest_list[0][1]: use_longest_list.clear() + use_central_list.clear() # add the match to the list if it's empty or the current match is equal length # or longer than the existing match