Merge branch 'develop' into bug/JAL-2255_seq-fetcher-broken-on-linux
[jalview.git] / src / jalview / io / ClustalFile.java
index f7a45de..5d58d42 100755 (executable)
@@ -37,9 +37,10 @@ public class ClustalFile extends AlignFile
   {
   }
 
-  public ClustalFile(String inFile, String type) throws IOException
+  public ClustalFile(String inFile, DataSourceType sourceType)
+          throws IOException
   {
-    super(inFile, type);
+    super(inFile, sourceType);
   }
 
   public ClustalFile(FileParse source) throws IOException
@@ -196,13 +197,7 @@ public class ClustalFile extends AlignFile
   }
 
   @Override
-  public String print()
-  {
-    return print(getSeqsAsArray());
-    // TODO: locaRNA style aln output
-  }
-
-  public String print(SequenceI[] s)
+  public String print(SequenceI[] s, boolean jvsuffix)
   {
     StringBuffer out = new StringBuffer("CLUSTAL" + newline + newline);
 
@@ -213,7 +208,7 @@ public class ClustalFile 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)
       {
@@ -244,7 +239,8 @@ public class ClustalFile 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) + " "));
 
         int start = i * len;
         int end = start + len;