From 4e104c0cb0261ca0373a9eaea1935cfdd492c49e Mon Sep 17 00:00:00 2001 From: Davide Albanese Date: Wed, 20 Sep 2017 16:27:13 +0200 Subject: [PATCH] Warning message when the maximum identity threshold is <0.99 and StrainEst infer a mixture of strains --- strainest/api/_est.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/strainest/api/_est.py b/strainest/api/_est.py index 628558c..0343ae3 100644 --- a/strainest/api/_est.py +++ b/strainest/api/_est.py @@ -259,3 +259,10 @@ def write_abund_info(): info["R"], info["PVal"] = pearsonr(y, y_pred) write_abund_info() + + if (np.max(coef_norm) < 0.9) and (max_ident_thr < 0.99): + sys.stdout.write("WARNING: the maximum identity threshold is <0.99 and " + "StrainEst has inferred a mixture of strains. The " + "mixture of strains could be a single strain with no " + "available reference genome. Please check the file " + "counts.txt.") \ No newline at end of file