X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FJPredFile.java;h=0ee41b8c64a811653ecc74a395b3458ede94aedf;hb=10ddc20a773099eaf0dc4d9d1bbb3b88b4176ed4;hp=cadf1535555db4ded65a52c50ea3a29d3003d587;hpb=f24dacb1da56fccf05d684e2f4899facec2aecf7;p=jalview.git diff --git a/src/jalview/io/JPredFile.java b/src/jalview/io/JPredFile.java index cadf153..0ee41b8 100755 --- a/src/jalview/io/JPredFile.java +++ b/src/jalview/io/JPredFile.java @@ -24,12 +24,11 @@ */ package jalview.io; -import jalview.datamodel.*; - import java.io.*; - import java.util.*; +import jalview.datamodel.*; + /** * DOCUMENT ME! @@ -264,12 +263,12 @@ public class JPredFile extends AlignFile } } } - + /* leave it to the parser user to actually check this. if (noSeqs < 1) { throw new IOException( "JpredFile Parser: No sequence in the prediction!"); - } + }*/ maxLength = seq_entries.elementAt(0).toString().length(); @@ -283,9 +282,9 @@ public class JPredFile extends AlignFile if (!Symscores.containsKey(ids.elementAt(i)) && !isValidProteinSequence(newSeq.getSequence())) { - throw new IOException( - "JPredConcise: Not a valid protein sequence - (" + - ids.elementAt(i).toString() + ")"); + throw new IOException("JPredConcise: " + +AppletFormatAdapter.INVALID_CHARACTERS +" : " + +ids.elementAt(i).toString() + ")"); } if (maxLength != seq_entries.elementAt(i).toString().length()) @@ -339,6 +338,34 @@ public class JPredFile extends AlignFile e.printStackTrace(); } } + Vector annotSeqs=null; + /** + * removeNonSequences + */ + public void removeNonSequences() + { + if (annotSeqs!=null) + return; + annotSeqs = new Vector(); + Vector newseqs = new Vector(); + int i=0; + int j=seqs.size(); + for (; i