X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FPfamFile.java;h=4c90bca4979caa8f967b5ee1ebb41c8f9822177f;hb=4932106f045349290d58ab38d216dff31fd9afce;hp=1af757341af1c1087a6e8e2b7cbc269c434d45cf;hpb=04011072920c5e2587a8d549869ee47e28ad7d81;p=jalview.git diff --git a/src/jalview/io/PfamFile.java b/src/jalview/io/PfamFile.java index 1af7573..4c90bca 100755 --- a/src/jalview/io/PfamFile.java +++ b/src/jalview/io/PfamFile.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) 2007 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 @@ -43,7 +43,8 @@ public class PfamFile super.initData(); } - public void parse() throws IOException + public void parse() + throws IOException { int i = 0; String line; @@ -105,17 +106,10 @@ public class PfamFile .length(); } - Sequence newSeq = parseId(headers.elementAt(i).toString()); - newSeq.setSequence( seqhash.get(headers.elementAt(i).toString()).toString()); + newSeq.setSequence(seqhash.get(headers.elementAt(i).toString()). + toString()); seqs.addElement(newSeq); - - if (!isValidProteinSequence(newSeq.getSequence())) - { - throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS - +" : "+ newSeq.getName() - +" : "+invalidCharacter); - } } else { @@ -138,9 +132,9 @@ public class PfamFile { String tmp = printId(s[i]); - if (s[i].getSequence().length() > max) + if (s[i].getSequence().length > max) { - max = s[i].getSequence().length(); + max = s[i].getSequence().length; } if (tmp.length() > maxid) @@ -160,9 +154,9 @@ public class PfamFile while ( (j < s.length) && (s[j] != null)) { - out.append(new Format("%-" + maxid + "s").form( printId(s[j])+" ")); + out.append(new Format("%-" + maxid + "s").form(printId(s[j]) + " ")); - out.append(s[j].getSequence() + "\n"); + out.append(s[j].getSequenceAsString() + "\n"); j++; }