Skip to content
Snippets Groups Projects
Commit 0b00b771 authored by Lihouck Flavien's avatar Lihouck Flavien
Browse files

Adding comments and fixing bugs on exonerate_parser

parent a07d2d16
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
##
# This script aims to extract the mismatches found by exonerate and
import sys
DEFAULT_DISTANCE = 10
......@@ -7,7 +10,11 @@ LINE_HEADER_SIZE = 9
def get_region_file(regions, folder, value):
target_region = ""
for elem in regions:
if not isinstance(regions, list):
elif not isinstance(regions[0], list):
region_list = regions[0].replace("[", "").replace("]","").split(" ")
for elem in region_list:
val = elem.split("_")
#print(val, value)
if int(val[0]) <= value < int(val[1]):
......@@ -94,7 +101,6 @@ def main():
output.write(str(value2 + start) + ": " + prefix_3 + query[1][start:end] + suffix_3 + "\n\n")
pb_cnt += 1
file = get_region_file(regions, folder, y)
print(file)
extract_read_pile(file, value2 % size, distance, output, len(str(value1+start)+": "))
if __name__ == "__main__":
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment