JAL-3914 fix population of PDBEntry metadata from 3d beacons
authorJim Procter <jprocter@dundee.ac.uk>
Fri, 15 Nov 2024 13:52:21 +0000 (13:52 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Fri, 15 Nov 2024 13:52:21 +0000 (13:52 +0000)
src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java

index 5c0d425..3e88831 100644 (file)
@@ -444,12 +444,12 @@ public class ThreeDBStructureChooserQuerySource
       String modelConfVer = idx_mqualtypever < 1 ? null
               : (String) restable.getValueAt(row, idx_mqualtypever);
       
-      String tftype = modelConfType.toUpperCase(Locale.ROOT);
+      String tftype = (modelConfType==null) ? null: modelConfType.toUpperCase(Locale.ROOT);
       TFType tempfacType = (tftype==null) ? null : TFType.valueOf(tftype);
       if (tftype==null || "".equals(tftype) || TFType.valueOf(tftype) == null )
       {
         // TODO maintain mappings between confidence types and tempfactypes
-        if (typeColumn.toLowerCase(Locale.ROOT).startsWith("alpha") || tftype.startsWith("ALPHAFOLD")) {
+        if (typeColumn.toLowerCase(Locale.ROOT).startsWith("alpha") || (tftype!=null && tftype.startsWith("ALPHAFOLD"))) {
           tftype = TFType.PLDDT.toString();
           modelConfVer = null;
         }