JAL-2136 JAL-2137 Improved STRUCTMODEL annotation syntax to reinstated fasta file...
[jalview.git] / src / jalview / io / SequenceAnnotationReport.java
index 850b1dc..a855aa2 100644 (file)
@@ -22,6 +22,7 @@ package jalview.io;
 
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.DBRefSource;
+import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.io.gff.GffConstants;
@@ -141,8 +142,7 @@ public class SequenceAnnotationReport
   void appendFeature(final StringBuilder sb, int rpos,
           Map<String, float[][]> minmax, SequenceFeature feature)
   {
-    String tmpString;
-    if (feature.getType().equals("disulfide bond"))
+    if (feature.isContactFeature())
     {
       if (feature.getBegin() == rpos || feature.getEnd() == rpos)
       {
@@ -150,7 +150,8 @@ public class SequenceAnnotationReport
         {
           sb.append("<br>");
         }
-        sb.append("disulfide bond ").append(feature.getBegin()).append(":")
+        sb.append(feature.getType()).append(" ").append(feature.getBegin())
+                .append(":")
                 .append(feature.getEnd());
       }
     }
@@ -178,7 +179,7 @@ public class SequenceAnnotationReport
         if (feature.getDescription() != null
                 && !feature.description.equals(feature.getType()))
         {
-          tmpString = feature.getDescription();
+          String tmpString = feature.getDescription();
           String tmp2up = tmpString.toUpperCase();
           int startTag = tmp2up.indexOf("<HTML>");
           if (startTag > -1)
@@ -223,11 +224,11 @@ public class SequenceAnnotationReport
         // check score should be shown
         if (!Float.isNaN(feature.getScore()))
         {
-          float[][] rng = (minmax == null) ? null : ((float[][]) minmax
-                  .get(feature.getType()));
+          float[][] rng = (minmax == null) ? null : minmax.get(feature
+                  .getType());
           if (rng != null && rng[0] != null && rng[0][0] != rng[0][1])
           {
-            sb.append(" Score=" + feature.getScore());
+            sb.append(" Score=").append(String.valueOf(feature.getScore()));
           }
         }
         String status = (String) feature.getValue("status");
@@ -449,6 +450,14 @@ public class SequenceAnnotationReport
       }
     }
     sb.append("</i>");
+
+    for (PDBEntry pdb : ds.getAllPDBEntries())
+    {
+      if (pdb != null && pdb.getProperty("PHYRE2_MODEL_INFO") != null)
+      {
+        sb.append(pdb.getProperty("PHYRE2_MODEL_INFO"));
+      }
+    }
     return maxWidth;
   }