Any character non aa or nucleotide is a space
[jalview.git] / src / jalview / io / PfamFile.java
index 8056f38..d84dc70 100755 (executable)
@@ -1,6 +1,6 @@
 /*\r
  * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
  *\r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
@@ -32,11 +32,6 @@ public class PfamFile
   {\r
   }\r
 \r
-  public PfamFile(String inStr)\r
-  {\r
-    super(inStr);\r
-  }\r
-\r
   public PfamFile(String inFile, String type)\r
       throws IOException\r
   {\r
@@ -114,14 +109,7 @@ public class PfamFile
         Sequence newSeq = parseId(headers.elementAt(i).toString());\r
         newSeq.setSequence( seqhash.get(headers.elementAt(i).toString()).toString());\r
         seqs.addElement(newSeq);\r
-\r
-        if (!isValidProteinSequence(newSeq.getSequence()))\r
-        {\r
-          throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS\r
-                                +" : "+ newSeq.getName()\r
-                                +" : "+invalidCharacter);\r
-        }\r
-      }\r
+     }\r
       else\r
       {\r
         System.err.println("PFAM File reader: Can't find sequence for " +\r
@@ -143,9 +131,9 @@ public class PfamFile
     {\r
       String tmp = printId(s[i]);\r
 \r
-      if (s[i].getSequence().length() > max)\r
+      if (s[i].getSequence().length > max)\r
       {\r
-        max = s[i].getSequence().length();\r
+        max = s[i].getSequence().length;\r
       }\r
 \r
       if (tmp.length() > maxid)\r
@@ -167,7 +155,7 @@ public class PfamFile
     {\r
       out.append(new Format("%-" + maxid + "s").form( printId(s[j])+" "));\r
 \r
-      out.append(s[j].getSequence() + "\n");\r
+      out.append(s[j].getSequenceAsString() + "\n");\r
       j++;\r
     }\r
 \r