score only annotation IO
authorjprocter <Jim Procter>
Sun, 17 Jun 2007 12:52:25 +0000 (12:52 +0000)
committerjprocter <Jim Procter>
Sun, 17 Jun 2007 12:52:25 +0000 (12:52 +0000)
src/jalview/io/AnnotationFile.java

index e54ae71..f8c2c2a 100755 (executable)
@@ -56,7 +56,7 @@ public class AnnotationFile
       {\r
         row = annotations[i];\r
 \r
-        if (!row.visible)\r
+        if (!row.visible && !row.hasScore())\r
         {\r
           continue;\r
         }\r
@@ -127,7 +127,7 @@ public class AnnotationFile
           text.append(row.description + "\t");\r
         }\r
 \r
-        for (int j = 0; j < row.annotations.length; j++)\r
+        for (int j = 0; row.annotations!=null && j < row.annotations.length; j++)\r
         {\r
           if (refSeq != null &&\r
               jalview.util.Comparison.isGap(refSeq.getCharAt(j)))\r
@@ -493,7 +493,7 @@ public class AnnotationFile
 \r
         annotation = new AlignmentAnnotation(label,\r
                                              description,\r
-                                             annotations,\r
+                                             (index==0) ? null : annotations,\r
                                              0,\r
                                              0,\r
                                              graphStyle);\r