From 0ebdbd871bfca159197d45d28fdfcfecadefcc5d Mon Sep 17 00:00:00 2001 From: fellen31 Date: Mon, 23 Sep 2024 16:07:29 +0200 Subject: [PATCH] Fix unstable variants in models output --- CHANGELOG.md | 6 +++++- genmod/score_variants/compound_scorer.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b7d0b..ccc0608 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Please add a new candidate release at the top after changing the latest one. Fee Try to use the following format: +## [3.8.3] + +- Fixed unstable compounds order in models output ([#133](https://github.com/Clinical-Genomics/genmod/issues/133)) + ## [3.8.0] - Rank score normalisation @@ -22,4 +26,4 @@ Try to use the following format: - Adds support for escaped characters in FORMAT description header strings ### Fixed -- Documentation about cli options `strict` and `phased` \ No newline at end of file +- Documentation about cli options `strict` and `phased` diff --git a/genmod/score_variants/compound_scorer.py b/genmod/score_variants/compound_scorer.py index a11aa71..5813354 100755 --- a/genmod/score_variants/compound_scorer.py +++ b/genmod/score_variants/compound_scorer.py @@ -268,7 +268,7 @@ def run(self): scored_compound_list.append(new_compound) new_compound_string = "{0}:{1}".format( - compound_family_id, '|'.join(scored_compound_list)) + compound_family_id, '|'.join(scored_compound_list.sort())) current_rank_score = float(current_rank_score) # Export rank score as float type new_rank_score_string = "{0}:{1}".format(compound_family_id, current_rank_score)