From a30c93041b5dddb591cd5c62302ffe2aeca858d7 Mon Sep 17 00:00:00 2001 From: James Procter Date: Mon, 23 Oct 2023 18:31:06 +0100 Subject: [PATCH] JAL-4311 fix ranking so models with like scores are sorted in their own group - AlphaFold 2 now selected as highest scoring model (58) over levyLab (50) --- src/jalview/gui/structurechooser/TDBResultAnalyser.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/structurechooser/TDBResultAnalyser.java b/src/jalview/gui/structurechooser/TDBResultAnalyser.java index 1cc7be4..28861d9 100644 --- a/src/jalview/gui/structurechooser/TDBResultAnalyser.java +++ b/src/jalview/gui/structurechooser/TDBResultAnalyser.java @@ -223,8 +223,8 @@ public class TDBResultAnalyser if (!o1_qualtype.equals(o2_qualtype)) { // prefer LDDT measure over others - return "pLDDT".equals(o1_prov) ? -1 - : "pLDDT".equals(o2_prov) ? 1 : 0; + return "pLDDT".equals(o1_qualtype) ? -1 + : "pLDDT".equals(o2_qualtype) ? 1 : 0; } // OR NO VALUE FOR THE QUALITY if (eitherNull(idx_mqual, o1data, o2data)) @@ -234,7 +234,8 @@ public class TDBResultAnalyser // models, so rank on qmean - b double o1_mq = (Double) o1data[idx_mqual]; double o2_mq = (Double) o2data[idx_mqual]; - return (o2_mq < o1_mq) ? 1 : (o2_mq == o1_mq) ? 0 : -1; + int res = (o2_mq < o1_mq) ? 1 : (o2_mq == o1_mq) ? 0 : -1; + return ("pLDDT".equals(o1_qualtype)) ? -res : res; } } else -- 1.7.10.2