Any character non aa or nucleotide is a space
[jalview.git] / src / jalview / io / AlignFile.java
index 0691d82..3fa4ac2 100755 (executable)
@@ -36,7 +36,7 @@ public abstract class AlignFile extends FileParse
     int noSeqs = 0;\r
     int maxLength = 0;\r
     Vector seqs;\r
-    Vector headers;\r
+    Vector annotations;\r
     long start;\r
     long end;\r
     boolean jvSuffix = true;\r
@@ -86,13 +86,24 @@ public abstract class AlignFile extends FileParse
         return s;\r
     }\r
 \r
+    public void addAnnotations(Alignment al)\r
+    {\r
+      for(int i=0; i<annotations.size(); i++)\r
+      {\r
+        al.addAnnotation(\r
+            (AlignmentAnnotation)annotations.elementAt(i)\r
+            );\r
+      }\r
+\r
+    }\r
+\r
     /**\r
      * Initialise objects to store sequence data in.\r
      */\r
     protected void initData()\r
     {\r
         seqs = new Vector();\r
-        headers = new Vector();\r
+        annotations = new Vector();\r
     }\r
 \r
     /**\r
@@ -110,20 +121,7 @@ public abstract class AlignFile extends FileParse
         }\r
     }\r
 \r
-    // Checks whether sequence is valid aa characters\r
-    protected boolean isValidProteinSequence(String sequence)\r
-    {\r
-        for (int i = 0; i < sequence.length(); i++)\r
-            if (jalview.schemes.ResidueProperties.aaIndex[sequence.charAt(i)]==-1)\r
-            {\r
-                invalidCharacter = sequence.charAt(i);\r
-                return false;\r
-            }\r
-\r
-        return true;\r
-    }\r
 \r
-    char invalidCharacter;\r
 \r
     /**\r
      * This method must be implemented to parse the contents of the file.\r