From: James Procter Date: Mon, 23 Oct 2023 17:31:06 +0000 (+0100) Subject: JAL-4311 fix ranking so models with like scores are sorted in their own group - Alpha... X-Git-Tag: Release_2_11_4_0~124^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fimprovement%2FJAL-4124_dont_duplacate_PAE_data_acrossviews;p=jalview.git 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) --- 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