From 4d06212fb80f8b613e9a847ee658842107f03b6a Mon Sep 17 00:00:00 2001
From: Amandine PERRIN <amandine.perrin@pasteur.fr>
Date: Thu, 9 Feb 2023 09:25:02 +0100
Subject: [PATCH] Accept only formats with 3 dots, not >=3

---
 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