From 3926a80dca6f181d42b900206f71d0486ef1543e 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 | 7 ++++++- genmod/score_variants/compound_scorer.py | 2 ++ requirements.txt | 1 + setup.py | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b7d0b..d5bce0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ Please add a new candidate release at the top after changing the latest one. Fee Try to use the following format: +## [3.8.3] + +- [#134](https://github.com/Clinical-Genomics/genmod/pull/134) - Fixed unstable compounds order in models output ([#133](https://github.com/Clinical-Genomics/genmod/issues/133)) +- [#134](https://github.com/Clinical-Genomics/genmod/pull/134) - Added `six` to requirements.txt and setup.py + ## [3.8.0] - Rank score normalisation @@ -22,4 +27,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..388aad7 100755 --- a/genmod/score_variants/compound_scorer.py +++ b/genmod/score_variants/compound_scorer.py @@ -267,6 +267,8 @@ def run(self): new_compound = "{0}>{1}".format(compound_id, compound_score) scored_compound_list.append(new_compound) + # Sort compound variants lexicographically + scored_compound_list.sort() new_compound_string = "{0}:{1}".format( compound_family_id, '|'.join(scored_compound_list)) diff --git a/requirements.txt b/requirements.txt index 3c47ac6..6028fc9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,4 @@ configobj == 5.0.8 intervaltree == 3.1.0 extract_vcf == 0.5 vcftoolbox == 1.5.1 +six == 1.16.0 diff --git a/setup.py b/setup.py index c1fa1ba..fe9106f 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,8 @@ 'configobj >= 5.0.8', 'intervaltree >= 3.1.0', 'extract_vcf >= 0.5', - 'vcftoolbox >= 1.5.1' + 'vcftoolbox >= 1.5.1', + 'six >= 1.16.0', ], packages=find_packages( exclude=('tests*', 'docs', 'examples', 'configs')