JAL-4311 fix ranking so models with like scores are sorted in their own group - Alpha... improvement/JAL-4124_dont_duplacate_PAE_data_acrossviews
authorJames Procter <j.procter@dundee.ac.uk>
Mon, 23 Oct 2023 17:31:06 +0000 (18:31 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Mon, 23 Oct 2023 17:31:06 +0000 (18:31 +0100)
src/jalview/gui/structurechooser/TDBResultAnalyser.java

index 1cc7be4..28861d9 100644 (file)
@@ -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