X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FMSFfile.java;h=4dbf9503f391a1385d896ea9b1e7cd01923c1973;hb=065e78a9a486362e2dd3ab8b64b8fd5111d4c656;hp=ab510d5800128330eda412ada81f717faee8a1f0;hpb=063142d5fe1679310fd6509ad78ef94c5b345f11;p=jalview.git diff --git a/src/jalview/io/MSFfile.java b/src/jalview/io/MSFfile.java index ab510d5..4dbf950 100755 --- a/src/jalview/io/MSFfile.java +++ b/src/jalview/io/MSFfile.java @@ -58,7 +58,7 @@ public class MSFfile extends AlignFile * @throws IOException * DOCUMENT ME! */ - public MSFfile(String inFile, String type) throws IOException + public MSFfile(String inFile, DataSourceType type) throws IOException { super(inFile, type); } @@ -216,7 +216,8 @@ public class MSFfile extends AlignFile * * @return DOCUMENT ME! */ - public String print(SequenceI[] sqs) + @Override + public String print(SequenceI[] sqs, boolean jvSuffix) { boolean is_NA = Comparison.isNucleotide(sqs); @@ -239,8 +240,7 @@ public class MSFfile extends AlignFile * modify to MSF format: uses '.' for internal gaps, * and '~' for leading or trailing gaps */ - String seqString = sqs[i].getSequenceAsString() - .replace('-', '.'); + String seqString = sqs[i].getSequenceAsString().replace('-', '.'); StringBuilder sb = new StringBuilder(seqString); @@ -278,10 +278,10 @@ public class MSFfile extends AlignFile i++; } - Format maxLenpad = new Format("%" + (new String("" + max)).length() - + "d"); - Format maxChkpad = new Format("%" + (new String("1" + max)).length() - + "d"); + Format maxLenpad = new Format( + "%" + (new String("" + max)).length() + "d"); + Format maxChkpad = new Format( + "%" + (new String("1" + max)).length() + "d"); i = 0; int bigChecksum = 0; @@ -308,7 +308,7 @@ public class MSFfile extends AlignFile while ((i < s.length) && (s[i] != null)) { - nameBlock[i] = new String(" Name: " + printId(s[i]) + " "); + nameBlock[i] = new String(" Name: " + printId(s[i], jvSuffix) + " "); idBlock[i] = new String("Len: " + maxLenpad.form(s[i].getSequence().length) + " Check: " @@ -360,7 +360,7 @@ public class MSFfile extends AlignFile while ((j < s.length) && (s[j] != null)) { - String name = printId(s[j]); + String name = printId(s[j], jvSuffix); out.append(new Format("%-" + maxid + "s").form(name + " ")); @@ -408,15 +408,4 @@ public class MSFfile extends AlignFile return out.toString(); } - - /** - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ - @Override - public String print() - { - return print(getSeqsAsArray()); - } }