X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FPfamFile.java;h=4c90bca4979caa8f967b5ee1ebb41c8f9822177f;hb=6905363d02254a557f93f66a2b69d85aa0b23696;hp=bbd441c8378190078a1b23cf352fa079cc3aa5a4;hpb=174230b4233d9ce80f94527768d2cd2f76da11ab;p=jalview.git diff --git a/src/jalview/io/PfamFile.java b/src/jalview/io/PfamFile.java index bbd441c..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) 2006 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++; }