X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FClustalFile.java;h=30c14004e64b970423da2d37408a7429b49ebaf5;hb=37a5dfc3c72a42689e90ad8a0e118e8855d9868b;hp=e72e0df32df2db9c21a6f78fbb39d2d7e2f199a3;hpb=55e2e9b22b133db8b9ff0979b0338a33081fc8fd;p=jalview.git diff --git a/src/jalview/io/ClustalFile.java b/src/jalview/io/ClustalFile.java index e72e0df..30c1400 100755 --- a/src/jalview/io/ClustalFile.java +++ b/src/jalview/io/ClustalFile.java @@ -32,11 +32,6 @@ public class ClustalFile { } - public ClustalFile(String inStr) - { - super(inStr); - } - public ClustalFile(String inFile, String type) throws IOException { @@ -48,7 +43,7 @@ public class ClustalFile super.initData(); } - public void parse() + public void parse() throws IOException { int i = 0; boolean flag = false; @@ -131,6 +126,14 @@ public class ClustalFile Sequence newSeq = parseId(headers.elementAt(i).toString()); newSeq.setSequence( seqhash.get(headers.elementAt(i).toString()).toString() ); + if (!isValidProteinSequence(newSeq.getSequence())) + { + throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS + + " : " + newSeq.getName() + + " : " + invalidCharacter); + } + + seqs.addElement(newSeq); } else