git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2507 fix test: knockon from capitalisation on secondary structure from stockholm...
[jalview.git]
/
src
/
jalview
/
io
/
ClustalFile.java
diff --git
a/src/jalview/io/ClustalFile.java
b/src/jalview/io/ClustalFile.java
index
5dd0e40
..
5d58d42
100755
(executable)
--- a/
src/jalview/io/ClustalFile.java
+++ b/
src/jalview/io/ClustalFile.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-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
}
public ClustalFile(FileParse source) throws IOException
@@
-47,11
+48,13
@@
public class ClustalFile extends AlignFile
super(source);
}
super(source);
}
+ @Override
public void initData()
{
super.initData();
}
public void initData()
{
super.initData();
}
+ @Override
public void parse() throws IOException
{
int i = 0;
public void parse() throws IOException
{
int i = 0;
@@
-193,13
+196,8
@@
public class ClustalFile extends AlignFile
}
}
}
}
- public String print()
- {
- return print(getSeqsAsArray());
- // TODO: locaRNA style aln output
- }
-
- public String print(SequenceI[] s)
+ @Override
+ public String print(SequenceI[] s, boolean jvsuffix)
{
StringBuffer out = new StringBuffer("CLUSTAL" + newline + newline);
{
StringBuffer out = new StringBuffer("CLUSTAL" + newline + newline);
@@
-210,7
+208,7
@@
public class ClustalFile extends AlignFile
while ((i < s.length) && (s[i] != null))
{
while ((i < s.length) && (s[i] != null))
{
- String tmp = printId(s[i]);
+ String tmp = printId(s[i], jvsuffix);
if (s[i].getSequence().length > max)
{
if (s[i].getSequence().length > max)
{
@@
-233,7
+231,7
@@
public class ClustalFile extends AlignFile
maxid++;
int len = 60;
maxid++;
int len = 60;
- int nochunks = (max / len) + 1;
+ int nochunks = (max / len) + (max % len > 0 ? 1 : 0);
for (i = 0; i < nochunks; i++)
{
for (i = 0; i < nochunks; i++)
{
@@
-241,7
+239,8
@@
public class ClustalFile extends AlignFile
while ((j < s.length) && (s[j] != null))
{
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;
int start = i * len;
int end = start + len;