X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FPfamFile.java;h=bc22fae2933693a7dec73c3ed1a5c81b12ad7a92;hb=c355d0f7a994d0d064078d363e612eb8c89581f1;hp=71cc7f04a200e542f82578addb08a7a93d598f15;hpb=abad83613306b9afe956746610e3d62b47c4c0fd;p=jalview.git diff --git a/src/jalview/io/PfamFile.java b/src/jalview/io/PfamFile.java index 71cc7f0..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 @@ -108,7 +109,7 @@ public class PfamFile extends AlignFile } if (spces + 1 < line.length()) { - tempseq.append(line.substring(spces + 1)); + tempseq.append(line.substring(spces + 1).trim()); } } @@ -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()); - } }