From b79835813984beb9b6e56a0c5158035ff8ea76fd Mon Sep 17 00:00:00 2001
From: Amandine PERRIN <amandine.perrin@pasteur.fr>
Date: Thu, 22 Oct 2020 12:13:55 +0200
Subject: [PATCH] Adapt progress bar to default terminal size

---
 PanACoTA/annotate_module/general_format_functions.py | 2 +-
 PanACoTA/annotate_module/genome_seq_functions.py     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/PanACoTA/annotate_module/general_format_functions.py b/PanACoTA/annotate_module/general_format_functions.py
index 1a1e30ce..0532b0a5 100644
--- a/PanACoTA/annotate_module/general_format_functions.py
+++ b/PanACoTA/annotate_module/general_format_functions.py
@@ -119,7 +119,7 @@ def format_genomes(genomes_ok, res_path, annot_path, prodigal_only, threads=1, q
                    progressbar.Bar(marker='█', left='', right=''),
                    ' ', progressbar.Counter(), "/{}".format(nbgen), ' (',
                    progressbar.Percentage(), ") - ", progressbar.Timer()]
-        bar = progressbar.ProgressBar(widgets=widgets, max_value=nbgen, term_width=100).start()
+        bar = progressbar.ProgressBar(widgets=widgets, max_value=nbgen, term_width=79).start()
     # Create a Queue to put logs from processes, and handle them after from a single thread
     m = multiprocessing.Manager()
     q = m.Queue()
diff --git a/PanACoTA/annotate_module/genome_seq_functions.py b/PanACoTA/annotate_module/genome_seq_functions.py
index dbb8a2b3..269f6602 100755
--- a/PanACoTA/annotate_module/genome_seq_functions.py
+++ b/PanACoTA/annotate_module/genome_seq_functions.py
@@ -101,7 +101,7 @@ def analyse_all_genomes(genomes, dbpath, tmp_path, nbn, soft, logger, quiet=Fals
                    progressbar.Percentage(), ') - ', progressbar.Timer(), ' - ',
                    progressbar.ETA()
                    ]
-        bar = progressbar.ProgressBar(widgets=widgets, max_value=nbgen, term_width=100).start()
+        bar = progressbar.ProgressBar(widgets=widgets, max_value=nbgen, term_width=79).start()
         curnum = 1
     toremove = []
     # Analyse genomes 1 by 1
-- 
GitLab