Skip to content
Snippets Groups Projects
Commit 22027111 authored by nina.marthe_ird.fr's avatar nina.marthe_ird.fr
Browse files

added progress bar for the load intersect

parent 728439c2
No related branches found
No related tags found
No related merge requests found
from .ClassSegFeat import *
from tqdm import tqdm
# create global variables to manipulate them in the functions below and to pass them to Functions.py
global Features
......@@ -118,8 +119,11 @@ def load_intersect(intersect_path):
print("loading the intersect file")
# open the file with the intersect between the segments and the gff
total_lines = len(["" for line in open(intersect_path,"r")])
with open(intersect_path,"r") as intersect_file:
for line in intersect_file:
#for line in intersect_file:
for line in tqdm(intersect_file, desc="Read intersect file", total=total_lines, unit="ligne",
disable=False):
line=line.split()
# get the ids for the dictionnaries' keys
feature_id=line[12].split(';')[0].split("=")[1].replace(".","_").replace(":","_")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment