From: Jim Procter Date: Fri, 20 Jan 2023 17:52:52 +0000 (+0000) Subject: JAL-4114 alphafold now marked as AB-INITIO so adjust ranking in categories X-Git-Tag: Release_2_11_2_6~2^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a3f8f05c73d08184254a8751c99824cfd126c4be;p=jalview.git JAL-4114 alphafold now marked as AB-INITIO so adjust ranking in categories --- diff --git a/src/jalview/gui/structurechooser/TDBResultAnalyser.java b/src/jalview/gui/structurechooser/TDBResultAnalyser.java index 2408d7a..fcc1ffe 100644 --- a/src/jalview/gui/structurechooser/TDBResultAnalyser.java +++ b/src/jalview/gui/structurechooser/TDBResultAnalyser.java @@ -20,8 +20,6 @@ */ package jalview.gui.structurechooser; -import java.util.Locale; - import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; @@ -29,6 +27,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; +import java.util.Locale; import jalview.datamodel.SequenceI; import jalview.fts.api.FTSData; @@ -45,8 +44,8 @@ public class TDBResultAnalyser */ private static List EXP_CATEGORIES = Arrays .asList(new String[] - { "EXPERIMENTALLY DETERMINED", "DEEP-LEARNING", "TEMPLATE-BASED", - "AB-INITIO", "CONFORMATIONAL ENSEMBLE" }); + { "EXPERIMENTALLY DETERMINED", "DEEP-LEARNING", "AB-INITIO", + "TEMPLATE-BASED", "CONFORMATIONAL ENSEMBLE" }); private SequenceI seq; @@ -178,6 +177,7 @@ public class TDBResultAnalyser int o2_xtent = o2_e - o2_s; if (o1_xtent == o2_xtent) { + // EXPERIMENTAL DATA ALWAYS TRUMPS MODELS if (o1_cat == scoreCategory(EXP_CATEGORIES.get(0))) { if (o1_prov.equals(o2_prov)) @@ -231,6 +231,12 @@ public class TDBResultAnalyser } else { + // if both are not experimental, then favour alphafold + if (o2_cat > 0 && o1_cat > 0) + { + return "ALPHAFOLD DB".equals(o1_prov) ? -1 + : "ALPHAFOLD DB".equals(o2_prov) ? 1 : 0; + } return o2_cat - o1_cat; } }