/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * 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.
*
{
}
- 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
if (noSeqs < 1)
{
- throw new IOException(
- MessageManager.getString("exception.pfam_no_sequences_found"));
+ throw new IOException(MessageManager
+ .getString("exception.pfam_no_sequences_found"));
}
for (i = 0; i < headers.size(); i++)
}
Sequence newSeq = parseId(headers.get(i).toString());
- newSeq.setSequence(seqhash.get(headers.get(i).toString())
- .toString());
+ newSeq.setSequence(
+ seqhash.get(headers.get(i).toString()).toString());
seqs.addElement(newSeq);
}
else
}
}
- public String print(SequenceI[] s)
+ @Override
+ public String print(SequenceI[] s, boolean jvsuffix)
{
StringBuffer out = new StringBuffer("");
while ((i < s.length) && (s[i] != null))
{
- String tmp = printId(s[i]);
+ String tmp = printId(s[i], jvsuffix);
- if (s[i].getSequence().length > max)
- {
- max = s[i].getSequence().length;
- }
+ max = Math.max(max, s[i].getLength());
if (tmp.length() > maxid)
{
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);
return out.toString();
}
-
- @Override
- public String print()
- {
- return print(getSeqsAsArray());
- }
}