From 6e38b40615390e2501275da4ab43d91c12bf8491 Mon Sep 17 00:00:00 2001 From: Kirill Bessonov Date: Thu, 7 Nov 2024 17:15:09 -0500 Subject: [PATCH] sorted for O mixed antigen is working --- ectyper/predictionFunctions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ectyper/predictionFunctions.py b/ectyper/predictionFunctions.py index 797d64a..0bcc415 100644 --- a/ectyper/predictionFunctions.py +++ b/ectyper/predictionFunctions.py @@ -547,7 +547,7 @@ def get_prediction(per_genome_df): if highsimilarity_oantigens: - mixedoantigen = sorted([selectedOantigen] + highsimilarity_oantigens, key = lambda x: re.search('O(\d+)',x).group(1), reverse=True) + mixedoantigen = sorted([selectedOantigen] + highsimilarity_oantigens, key = lambda x: int(re.search(r'O(\d+)',x).group(1)), reverse=False) serotype['O']['serogroup'] = "/".join(mixedoantigen) LOG.info("Highly similar O-antigen candidates were found for {}".format(mixedoantigen)) elif selectedOantigen != "":