Commit e90f73f4 authored by Pierre Marijon's avatar Pierre Marijon

Remove progression parametre, not usefull

parent 58cc0d4a
......@@ -21,8 +21,6 @@ def main(args=None):
help="Remove all containment")
parser.add_argument("-i", "--remove-all-internal", action='store_true',
help="Remove all internal match")
parser.add_argument("-p", "--progression", action='store_true',
help="Show a progress bar durring reading")
arg = vars(parser.parse_args(args))
paf = arg["paf"].name
......@@ -32,32 +30,13 @@ def main(args=None):
parser = Parser(not rm_all_contain, not rm_all_internal)
file_size = os.path.getsize(paf)
last_time = time.time()
print("begin parsing")
while "read all line in file":
line = arg["paf"].readline()
if not line:
break
parser.parse_line(line)
if arg["progression"] and time.time() - last_time > 2:
res = parser.parse_line(line)
if res is not None:
logging.warning(str(res))
precent = format((arg["paf"].tell() * 100) / file_size, '.2f')
precent += "%"
sys.stdout.write(precent)
sys.stdout.write("\b" * len(precent))
sys.stdout.flush()
last_time = time.time()
print("end parsing")
print("begin writting")
for line in arg["paf"]:
result = parser.parse_line(line)
if result is not None:
logging.warning(str(res))
for line in parser.generate_gfa():
arg["gfa"].write(line+"\n")
print("end writting")
if __name__ == "__main__":
main(sys.argv[1:])
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