From: Jim Procter Date: Fri, 20 Jan 2023 17:53:48 +0000 (+0000) Subject: JAL-4114 only rank model qualities that are computed with the same method, and uprank... X-Git-Tag: Release_2_11_2_6~2^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1a80985facca80167fb54ca70d9778b1c3bcf9f1;p=jalview.git JAL-4114 only rank model qualities that are computed with the same method, and uprank models with pLDDT over other types of models in the same model type category --- diff --git a/src/jalview/gui/structurechooser/TDBResultAnalyser.java b/src/jalview/gui/structurechooser/TDBResultAnalyser.java index fcc1ffe..e817b26 100644 --- a/src/jalview/gui/structurechooser/TDBResultAnalyser.java +++ b/src/jalview/gui/structurechooser/TDBResultAnalyser.java @@ -61,6 +61,8 @@ public class TDBResultAnalyser private int idx_mqual; + private int idx_mqualtype; + private int idx_resol; /** @@ -91,6 +93,7 @@ public class TDBResultAnalyser idx_mprov = lastTdbRequest.getFieldIndex("Provider"); idx_mqual = lastTdbRequest.getFieldIndex("Confidence"); idx_resol = lastTdbRequest.getFieldIndex("Resolution"); + idx_mqualtype = lastTdbRequest.getFieldIndex("Confidence Score Type"); } /** @@ -168,6 +171,8 @@ public class TDBResultAnalyser int o2_cat = scoreCategory((String) o2data[idx_mcat]); String o2_prov = ((String) o2data[idx_mprov]) .toUpperCase(Locale.ROOT); + String o1_qualtype = (String) o1data[idx_mqualtype], + o2_qualtype = (String) o2data[idx_mqualtype]; if (o1_cat == o2_cat) { @@ -209,6 +214,19 @@ public class TDBResultAnalyser } else { + // RANK ON QUALITY - DOWNRANK THOSE WITH NO QUALITY MEASURE + if (eitherNull(idx_mqualtype, o1data, o2data)) + { + return nonNullFirst(idx_mqualtype, o1data, o2data); + } + // ONLY COMPARE LIKE QUALITY SCORES + if (!o1_qualtype.equals(o2_qualtype)) + { + // prefer LDDT measure over others + return "pLDDT".equals(o1_prov) ? -1 + : "pLDDT".equals(o2_prov) ? 1 : 0; + } + // OR NO VALUE FOR THE QUALITY if (eitherNull(idx_mqual, o1data, o2data)) { return nonNullFirst(idx_mqual, o1data, o2data);