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-2416 allow alphabet symbol (optional) in first column of score table
[jalview.git]
/
src
/
jalview
/
io
/
PfamFile.java
diff --git
a/src/jalview/io/PfamFile.java
b/src/jalview/io/PfamFile.java
index
71cc7f0
..
bc22fae
100755
(executable)
--- 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
}
public PfamFile(FileParse source) throws IOException
@@
-108,7
+109,7
@@
public class PfamFile extends AlignFile
}
if (spces + 1 < line.length())
{
}
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 (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();
}
{
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("");
{
StringBuffer out = new StringBuffer("");
@@
-154,7
+155,7
@@
public class PfamFile 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)
{
@@
-178,7
+179,8
@@
public class PfamFile 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) + " "));
out.append(s[j].getSequenceAsString());
out.append(newline);
out.append(s[j].getSequenceAsString());
out.append(newline);
@@
-189,10
+191,4
@@
public class PfamFile extends AlignFile
return out.toString();
}
return out.toString();
}
-
- @Override
- public String print()
- {
- return print(getSeqsAsArray());
- }
}
}