Commit bf65c555 authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

fixed tuple out of range issue

parent 11098857
......@@ -248,7 +248,7 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
index = 0
while index + w < len(input):
#print("Running Bayespairing on sequence window:", index, index + w)
print(input[index:index + w])
#print(input[index:index + w])
bf = max(0, index)
maxs = run_BP(input[index:index + w], ss, modules_to_parse, dataset, "NONE", m, n, sm, mc, p, k,sscons)
for mod in modules_to_parse:
......@@ -261,7 +261,7 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
all_maxes.append((mod, index, corrected_maxes))
index = index + s
#print("Running Bayespairing on sequence part:", index, len(input))
print(input[index:])
#print(input[index:])
maxs = run_BP(input[index:], ss, modules_to_parse, dataset, "NONE", m, n, sm, mc, p, k,sscons)
for mod in modules_to_parse:
corrected_maxes = []
......@@ -324,7 +324,7 @@ def present_output(all_maxes, threshold, offset=0):
if len(m) < 2:
continue
current_module = m[0]
for sub_max in range(len(m)):
for sub_max in range(len(m)-2):
if sub_max % 3 == 1:
this_max = [round(m[sub_max], 3), *(seq_ranges(m[sub_max + 1],m[sub_max + 2]))]
if this_max[0] > threshold and not check_already_there(output, this_max, current_module):
......
Markdown is supported
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