import jalview.datamodel.AlignmentI;
import jalview.io.AppletFormatAdapter;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
import jalview.io.FileParse;
-import jalview.io.FormatAdapter;
import java.io.File;
import java.io.IOException;
searchResult = new AppletFormatAdapter().readFile(baseUrl
+ "/download/" + jobid + "/score?format=afa&t=.gz",
- FormatAdapter.URL, "FASTA");
+ DataSourceType.URL, FileFormat.Fasta);
// TODO extract gapped columns as '.' - inserts to query profile
// do scores
FileParse jsonsource = new FileParse(baseUrl + "/download/" + jobid
- + "/score?format=json", FormatAdapter.URL);
+ + "/score?format=json", DataSourceType.URL);
if (!jsonsource.isValid())
{
throw new IOException("Couldn't access scores for Jackhammer results");
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
import jalview.io.FileParse;
import jalview.io.FormatAdapter;
private AlignmentI getSearchResultFragmentAlignment() throws Exception
{
AlignmentI alf = new FormatAdapter().readFile(
- alignmentFragFile.getAbsolutePath(), FormatAdapter.FILE,
- "FASTA");
+ alignmentFragFile.getAbsolutePath(), DataSourceType.FILE,
+ FileFormat.Fasta);
return alf;
}
private AlignmentI getSearchResultAlignment() throws Exception
{
AlignmentI alf = new FormatAdapter().readFile(
- alignmentResultFile.getAbsolutePath(), FormatAdapter.FILE,
- "FASTA");
+ alignmentResultFile.getAbsolutePath(), DataSourceType.FILE,
+ FileFormat.Fasta);
return alf;
}
JSONParser jp = new JSONParser();
// read JSON in same way - via fileparse
Object hitfragment = jp.parse(new FileParse(hitTestFile,
- FormatAdapter.FILE).getReader());
+ DataSourceType.FILE).getReader());
Assert.assertTrue((hitfragment instanceof JSONObject),
"Didn't find a JSON object map in " + hitTestFile);
AlignmentI searchResult = getSearchResultFragmentAlignment();
"Didn't read search result alignment from " + alignmentFragFile);
HmmerJSONProcessor hjsp = new HmmerJSONProcessor(searchResult);
- hjsp.parseFrom(new FileParse(hmmerResultFile, FormatAdapter.FILE));
+ hjsp.parseFrom(new FileParse(hmmerResultFile, DataSourceType.FILE));
AlignmentAnnotation[] aa = searchResult.getSequenceAt(5)
.getAnnotation();
Assert.assertNotNull(aa);