import jalview.io.FileParse;
import jalview.io.FormatAdapter;
-import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
-import java.util.StringTokenizer;
import java.util.regex.Matcher;
import org.apache.axis.transport.http.HTTPConstants;
System.out.println("Result\n" + res);
return;
}
+
/**
*
* @param input
if ("PEND".equals(st) || "RUN".equals("st"))
{
JSONArray iters = jobstate.getJSONArray("result");
- lastiter = iters.getJSONObject(iters.length() - 1)
- .getString("uuid");
+ lastiter = iters.getJSONObject(iters.length() - 1).getString(
+ "uuid");
if (lastiter.length() > 0)
{
java.util.regex.Pattern p = java.util.regex.Pattern
// $ua->get( $rootUrl."/results/".$lastIteration->{uuid} . "/score"
return lastiter;
/*
- * * #Job should have finished, but we may have converged, so get the last
+ * * #Job should have finished, but we may have converged, so get the last
* job. my $results = $json->decode( $response->content ); my $lastIteration
* = pop( @{ $results->{result} } ); #Now fetch the results of the last
* iteration my $searchResult = $ua->get( $rootUrl."/results/" .
// get results
searchResult = new AppletFormatAdapter().readFile(baseUrl
- + "/download/" + jobid
- + "/score?format=afa&t=.gz", FormatAdapter.URL, "FASTA");
+ + "/download/" + jobid + "/score?format=afa&t=.gz",
+ FormatAdapter.URL, "FASTA");
- // extract gapped columns as '.' - inserts to query profile
- // match up to dataset.
+ // TODO extract gapped columns as '.' - inserts to query profile
- // and do scores
+ // TODO match up jackhammer results to dataset.
- FileParse csvsource = new FileParse(baseUrl + "/download/" + jobid
- + "/score?format=csv", FormatAdapter.URL);
- if (!csvsource.isValid())
+ // do scores
+ FileParse jsonsource = new FileParse(baseUrl + "/download/" + jobid
+ + "/score?format=json", FormatAdapter.URL);
+ if (!jsonsource.isValid())
{
throw new IOException("Couldn't access scores for Jackhammer results");
}
- readJackhmmerScores(searchResult, csvsource);
+ readJackhmmerScores(searchResult, jsonsource);
return searchResult;
}
* typ 4h1o_A
*/
private static String[] _hmmsearchcols = new String[] { "acc", "name", "" };
+
private void readJackhmmerScores(AlignmentI searchResult,
- FileParse csvsource)
- throws IOException
+ FileParse jsonsource) throws IOException, OutOfMemoryError
{
- String line;
- BufferedReader rl = new BufferedReader(csvsource.getReader());
+ HmmerJSONProcessor hjp = new HmmerJSONProcessor(searchResult);
+ hjp.parseFrom(jsonsource);
- while ((line = rl.readLine()) != null)
- {
- StringTokenizer st = new StringTokenizer(line, "\t");
-
- }
// http://www.ebi.ac.uk/Tools/hmmer/download/60048B38-7CEC-11E5-A230-CED6D26C98AD.5/score?format=csv
// 1gri_A 1gri_A 217 jackhmmer - 163 4.7e-62 212.4 0.1 1 2 4.4e-46 2.1e-43
// 151.758316040039 0.04 11 151 3 139 1 150 0.94 GROWTH FACTOR BOUND PROTEIN