Improved progress display when importing files in a DMS
This commit is contained in:
@ -166,9 +166,12 @@ def genbankIterator_dir(dir_path,
|
||||
):
|
||||
path = dir_path
|
||||
read = 0
|
||||
for filename in glob.glob(os.path.join(path, b'*.gbff*')):
|
||||
read_files = 0
|
||||
files = [filename for filename in glob.glob(os.path.join(path, b'*.gbff*'))]
|
||||
for filename in files:
|
||||
if read==only:
|
||||
return
|
||||
print("Parsing file %s (%d/%d)" % (tostr(filename), read_files, len(files)))
|
||||
f = uopen(filename)
|
||||
if only is not None:
|
||||
only_f = only-read
|
||||
@ -177,7 +180,8 @@ def genbankIterator_dir(dir_path,
|
||||
for seq in genbankIterator_file(f, skip=skip, only=only_f, buffersize=buffersize):
|
||||
yield seq
|
||||
read+=1
|
||||
|
||||
read_files+=1
|
||||
|
||||
|
||||
def genbankIterator(obj,
|
||||
int skip=0,
|
||||
|
Reference in New Issue
Block a user