From 9b6e2fcd7b0b89feede5f1139aa489c1e48b75c3 Mon Sep 17 00:00:00 2001 From: aineniamh Date: Thu, 14 Apr 2022 15:51:07 +0100 Subject: [PATCH] handle recombinant assignments that dont pass both parents- dont accept best constellation update if mrca lineage is an empty string --- scorpio/__init__.py | 2 +- scorpio/scripts/type_constellations.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scorpio/__init__.py b/scorpio/__init__.py index e8400b2..b13a4cf 100644 --- a/scorpio/__init__.py +++ b/scorpio/__init__.py @@ -1,2 +1,2 @@ _program = "scorpio" -__version__ = "0.3.16" +__version__ = "0.3.17" diff --git a/scorpio/scripts/type_constellations.py b/scorpio/scripts/type_constellations.py index fb35980..a1851b9 100755 --- a/scorpio/scripts/type_constellations.py +++ b/scorpio/scripts/type_constellations.py @@ -1051,12 +1051,13 @@ def classify_constellations(in_fasta, list_constellation_files, constellation_na or (counts['support'] == best_support and counts['conflict'] < best_conflict)\ or (counts['support'] == best_support and counts['conflict'] == best_conflict and counts['rules'] > best_counts["rules"])\ or (best_constellation in parents): - best_constellation = constellation - logging.debug("Set best constellation %s" %best_constellation) - best_support = counts['support'] - best_conflict = counts['conflict'] - best_counts = counts - best_call = call + if mrca_lineage_dict[constellation]: + best_constellation = constellation + logging.debug("Set best constellation %s" %best_constellation) + best_support = counts['support'] + best_conflict = counts['conflict'] + best_counts = counts + best_call = call if interspersion: if counts["alt"] > 1: