String refSeqId = null;
public boolean annotateAlignmentView(AlignViewportI viewport,
- String file, String protocol)
+ String file, DataSourceType protocol)
{
ColumnSelection colSel = viewport.getColumnSelection();
if (colSel == null)
}
public boolean readAnnotationFile(AlignmentI al, String file,
- String protocol)
+ DataSourceType sourceType)
{
- return readAnnotationFile(al, null, file, protocol);
+ return readAnnotationFile(al, null, file, sourceType);
}
public boolean readAnnotationFile(AlignmentI al, ColumnSelection colSel,
- String file, String protocol)
+ String file, DataSourceType sourceType)
{
baseUri = "";
BufferedReader in = null;
try
{
- if (protocol.equals(AppletFormatAdapter.FILE))
+ if (sourceType == DataSourceType.FILE)
{
in = new BufferedReader(new FileReader(file));
baseUri = new File(file).getParent();
baseUri += "/";
}
}
- else if (protocol.equals(AppletFormatAdapter.URL))
+ else if (sourceType == DataSourceType.URL)
{
URL url = new URL(file);
in = new BufferedReader(new InputStreamReader(url.openStream()));
baseUri = baseUri.substring(0, baseUri.lastIndexOf("/")) + "/";
}
}
- else if (protocol.equals(AppletFormatAdapter.PASTE))
+ else if (sourceType == DataSourceType.PASTE)
{
in = new BufferedReader(new StringReader(file));
// TODO - support mimencoded PDBs for a paste.. ?
baseUri = "";
}
- else if (protocol.equals(AppletFormatAdapter.CLASSLOADER))
+ else if (sourceType == DataSourceType.CLASSLOADER)
{
java.io.InputStream is = getClass().getResourceAsStream("/" + file);
if (is != null)
else if (key.equalsIgnoreCase("consThreshold"))
{
sg.cs.setConservationInc(Integer.parseInt(value));
- Conservation c = new Conservation("Group", 3,
- sg.getSequences(null), sg.getStartRes(),
- sg.getEndRes() + 1);
+ Conservation c = new Conservation("Group", sg.getSequences(null),
+ sg.getStartRes(), sg.getEndRes() + 1);
c.calculate();
c.verdict(false, 25); // TODO: refer to conservation percent threshold