X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FPfamFile.java;h=bc22fae2933693a7dec73c3ed1a5c81b12ad7a92;hb=35ce4609cc8a776b1d85a1f2c2c70aaa106c1a3b;hp=667da9fccd72ebc7f3fb3bc8a2bc531676806397;hpb=063142d5fe1679310fd6509ad78ef94c5b345f11;p=jalview.git diff --git a/src/jalview/io/PfamFile.java b/src/jalview/io/PfamFile.java index 667da9f..bc22fae 100755 --- a/src/jalview/io/PfamFile.java +++ b/src/jalview/io/PfamFile.java @@ -36,9 +36,10 @@ public class PfamFile extends AlignFile { } - public PfamFile(String inFile, String type) throws IOException + public PfamFile(String inFile, DataSourceType sourceType) + throws IOException { - super(inFile, type); + super(inFile, sourceType); } public PfamFile(FileParse source) throws IOException @@ -124,8 +125,7 @@ public class PfamFile extends AlignFile { if (seqhash.get(headers.get(i)) != null) { - if (maxLength < seqhash.get(headers.get(i)).toString() - .length()) + if (maxLength < seqhash.get(headers.get(i)).toString().length()) { maxLength = seqhash.get(headers.get(i)).toString().length(); } @@ -143,7 +143,8 @@ public class PfamFile extends AlignFile } } - public String print(SequenceI[] s) + @Override + public String print(SequenceI[] s, boolean jvsuffix) { StringBuffer out = new StringBuffer(""); @@ -154,7 +155,7 @@ public class PfamFile extends AlignFile while ((i < s.length) && (s[i] != null)) { - String tmp = printId(s[i]); + String tmp = printId(s[i], jvsuffix); if (s[i].getSequence().length > max) { @@ -178,7 +179,8 @@ public class PfamFile extends AlignFile 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], jvsuffix) + " ")); out.append(s[j].getSequenceAsString()); out.append(newline); @@ -189,10 +191,4 @@ public class PfamFile extends AlignFile return out.toString(); } - - @Override - public String print() - { - return print(getSeqsAsArray()); - } }