From cc30408a312a4c317cb1ea7741e4b7dbbd60ba1d Mon Sep 17 00:00:00 2001 From: Jody Phelan Date: Fri, 30 Aug 2024 00:50:26 +0200 Subject: [PATCH] variant annotation ordering --- tbprofiler/reformat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tbprofiler/reformat.py b/tbprofiler/reformat.py index 02da7ba..9d78422 100644 --- a/tbprofiler/reformat.py +++ b/tbprofiler/reformat.py @@ -270,7 +270,7 @@ def clean_up_duplicate_annotations(variants: Variant) -> None: """ confidence_levels = ['Assoc w R','Assoc w R - Interim','Uncertain significance','Not assoc w R - Interim','Not assoc w R'] for var in variants: - keys = set([(ann['type'],ann['drug']) for ann in var.annotation]) + keys = sorted(list(set([(ann['type'],ann['drug']) for ann in var.annotation]))) new_annotations = [] for key in keys: confidence_anns = []