From 2c662e0f55acb2a1dd4c9bb62d8f81f1ce087cc3 Mon Sep 17 00:00:00 2001 From: Amandine PERRIN <amandine.perrin@pasteur.fr> Date: Mon, 12 Oct 2020 16:39:59 +0200 Subject: [PATCH] Start progressbar at 0% instead of N/A% --- PanACoTA/annotate_module/annotation_functions.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PanACoTA/annotate_module/annotation_functions.py b/PanACoTA/annotate_module/annotation_functions.py index beefeeee..0e608d54 100755 --- a/PanACoTA/annotate_module/annotation_functions.py +++ b/PanACoTA/annotate_module/annotation_functions.py @@ -147,8 +147,12 @@ def run_annotation_all(genomes, threads, force, annot_folder, prodigal_only=Fals break # If not done, get number of genomes left remaining = final._number_left - # Update progress bar - bar.update(nbgen - remaining) + # Add this to start progressbar with 0% instead of N/A% + if remaining == nbgen: + bar.update(0.0000001) + else: + # Update progress bar + bar.update(nbgen - remaining) # End progress bar bar.finish() pool.join() -- GitLab