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

cleaned up result display for parse_seqs

parent c4f3ecb2
......@@ -77,21 +77,28 @@ def run_fasta(input, modules_to_parse,dataset,ss = "",arguments={}):
index = 0
while index+100<len(input):
print("Running Bayespairing on sequence:",input[index:index+100])
#maxs=[]
maxs = run_BP(input[index:index+100], ss, modules_to_parse, dataset, "NONE",m,n,sm,mc,k)
corrected_maxes = []
for cand in maxs:
score,pos = cand
corrected_maxes.append([score,[i+index for i in pos]])
print(maxs)
for ind,cand in enumerate(maxs[0]):
if ind%2==1:
corrected_maxes.append([i+index for i in cand])
else:
corrected_maxes.append(cand)
all_maxes.append(corrected_maxes)
index=index+100
maxs = run_BP(input[index:], ss, modules_to_parse, dataset, "NONE",m,n,sm,mc,k)
corrected_maxes = []
for cand in maxs:
score,pos = cand
corrected_maxes.append([score,[i+index for i in pos]])
for ind,cand in enumerate(maxs[0]):
if ind%2==1:
corrected_maxes.append([i+index for i in cand])
else:
corrected_maxes.append(cand)
all_maxes.append(corrected_maxes)
print("FINAL RESULTS:")
print(all_maxes)
for i in (all_maxes):
print(i)
if __name__ == "__main__":
arguments = {}
......@@ -106,8 +113,8 @@ if __name__ == "__main__":
parser.add_argument("-d", help="Dataset, as a pickle. Default will be the dataset presented in the paper")
parser.add_argument("-k", help="Number of times the Bayes Net should be sampled")
args = parser.parse_args()
print(args)
print(args.seq)
#print(args)
#print(args.seq)
if args.verbose:
arguments["v"]= True
if args.sm != None:
......
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