From faaee1ca51ad81dff76c44276f32577aee223864 Mon Sep 17 00:00:00 2001 From: Amandine PERRIN <amandine.perrin@pasteur.fr> Date: Tue, 31 Jan 2023 03:53:36 +0100 Subject: [PATCH] genome name cannot have more than 3 '.' separated fields --- PanACoTA/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PanACoTA/utils.py b/PanACoTA/utils.py index 61e3ad99..b94b6bb5 100755 --- a/PanACoTA/utils.py +++ b/PanACoTA/utils.py @@ -548,7 +548,7 @@ def sort_genomes_by_name(x): x = x[1][0] # if format is ESCO.1512.00001 sort by ESCO, then 00001 - if "." in x and len(x.split(".")) >= 3: + if "." in x and len(x.split(".")) == 3: return x.split(".")[0], int(x.split(".")[-1]) # if format is not like this, just return alphabetical order return x, -- GitLab