import java.io.*;\r
import java.util.*;\r
\r
-import jalview.analysis.*;\r
import jalview.datamodel.*;\r
\r
public class PIRFile\r
super(inFile, type);\r
}\r
\r
- public void parse()\r
+ public void parse() throws IOException\r
{\r
- try\r
- {\r
StringBuffer sequence;\r
String line = null;\r
\r
{\r
sequence.setLength(sequence.length() - 1);\r
newSeq.setSequence(sequence.toString());\r
+ if (!isValidProteinSequence(newSeq.getSequence()))\r
+ {\r
+ throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS\r
+ +" : "+ newSeq.getName()\r
+ +" : "+invalidCharacter);\r
+ }\r
+\r
seqs.addElement(newSeq);\r
ModellerDescription md = new ModellerDescription(newSeq.\r
getDescription());\r
md.updateSequenceI(newSeq);\r
}\r
}\r
- }\r
- catch (Exception ex)\r
- {\r
- ex.printStackTrace();\r
- }\r
}\r
\r
public String print()\r
{\r
// modeller doesn't really do nucleotides, so we don't do anything fancy\r
// Nucleotide sequence tags should have a >DL; prefix\r
- out.append(">P1;" + s[i].getName() + "\n"); // JBPNote Should change >P to >N\r
+ out.append(">N1;" + s[i].getName() + "\n"); // JBPNote Should change >P to >N\r
if (s[i].getDescription() == null)\r
{\r
out.append(s[i].getName() + " " +\r