- private static final RunnerConfig<GlobPlot> globPlotOptions = Util\r
- .getSupportedOptions(GlobPlot.class);\r
-\r
- private static final PresetManager<GlobPlot> globPlotPresets = Util\r
- .getPresets(GlobPlot.class);\r
-\r
- private static final LimitsManager<GlobPlot> limitMan = compbio.runner.Util\r
- .getLimits(new GlobPlot().getType());\r
-\r
- ConfiguredExecutable<GlobPlot> init(List<FastaSequence> sequences)\r
- throws JobSubmissionException {\r
- GlobPlot globPlot = new GlobPlot();\r
- globPlot.setInput("fasta.in").setOutput("globPlot.out");\r
- return Configurator.configureExecutable(globPlot, sequences);\r
- }\r
-\r
- @Override\r
- public ScoreManager getAnnotation(String jobId)\r
- throws ResultNotAvailableException {\r
- WSUtil.validateJobId(jobId);\r
- AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId);\r
- ConfiguredExecutable<GlobPlot> globPlot = (ConfiguredExecutable<GlobPlot>) asyncEngine\r
- .getResults(jobId);\r
- ScoreManager mas = globPlot.getResults();\r
- log.trace(jobId + " getConservation : " + mas);\r
- return mas;\r
- }\r
-\r
- @Override\r
- public Limit<GlobPlot> getLimit(String presetName) {\r
- return limitMan.getLimitByName(presetName);\r
- }\r
-\r
- @Override\r
- public LimitsManager<GlobPlot> getLimits() {\r
- return limitMan;\r
- }\r
-\r
- @Override\r
- public ChunkHolder pullExecStatistics(String jobId, long position) {\r
- // Execution stat is not supported\r
- return new ChunkHolder("", -1);\r
- }\r
-\r
- @Override\r
- public boolean cancelJob(String jobId) {\r
- WSUtil.validateJobId(jobId);\r
- return WSUtil.cancelJob(jobId);\r
- }\r
-\r
- @Override\r
- public JobStatus getJobStatus(String jobId) {\r
- WSUtil.validateJobId(jobId);\r
- return WSUtil.getJobStatus(jobId);\r
- }\r
-\r
- @Override\r
- public PresetManager<GlobPlot> getPresets() {\r
- return globPlotPresets;\r
- }\r
-\r
- @Override\r
- public RunnerConfig<GlobPlot> getRunnerOptions() {\r
- return globPlotOptions;\r
- }\r
-\r
- String analize(List<FastaSequence> sequences,\r
- ConfiguredExecutable<GlobPlot> confExec, Logger log, String method,\r
- Limit<GlobPlot> limit) throws JobSubmissionException {\r
- if (limit != null && limit.isExceeded(sequences)) {\r
- throw LimitExceededException.newLimitExceeded(limit, sequences);\r
- }\r
-\r
- compbio.runner.Util.writeInput(sequences, confExec);\r
- AsyncExecutor engine = Configurator.getAsyncEngine(confExec);\r
- String jobId = engine.submitJob(confExec);\r
- return jobId;\r
- }\r
-\r
- @Override\r
- public String analize(List<FastaSequence> sequences)\r
- throws UnsupportedRuntimeException, LimitExceededException,\r
- JobSubmissionException {\r
- WSUtil.validateFastaInput(sequences);\r
- ConfiguredExecutable<GlobPlot> confGlobPlot = init(sequences);\r
-\r
- return analize(sequences, confGlobPlot, null, "analize", getLimit(""));\r