X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FClustalFile.java;h=e3f83ee652bda92538a9e0e627c197065af4765b;hb=63f7dffaa9b668ad5ab7d8092e5232908e4b0bcb;hp=e72e0df32df2db9c21a6f78fbb39d2d7e2f199a3;hpb=55e2e9b22b133db8b9ff0979b0338a33081fc8fd;p=jalview.git diff --git a/src/jalview/io/ClustalFile.java b/src/jalview/io/ClustalFile.java index e72e0df..e3f83ee 100755 --- a/src/jalview/io/ClustalFile.java +++ b/src/jalview/io/ClustalFile.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -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