Interface AnalysisExecutionService
-
- All Known Implementing Classes:
AnalysisExecutionServiceGalaxy
public interface AnalysisExecutionService
Service for submission ofAnalysisSubmission
s to an execution manager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.Future<AnalysisSubmission>
cleanupSubmission(AnalysisSubmission analysisSubmission)
Cleans up any intermediate files in the execution manager for this submission.java.util.concurrent.Future<AnalysisSubmission>
executeAnalysis(AnalysisSubmission analysisSubmission)
Executes the passed preparedAnalysisSubmission
in an execution manager.int
getCapacity()
Get theAnalysisExecutionService
capacity for running new jobs.GalaxyWorkflowStatus
getWorkflowStatus(AnalysisSubmission submittedAnalysis)
Gets the status for the given submitted analysis.java.util.concurrent.Future<AnalysisSubmission>
postProcessResults(AnalysisSubmission analysisSubmission)
Performs any post processing required for anAnalysisSubmission
.java.util.concurrent.Future<AnalysisSubmission>
prepareSubmission(AnalysisSubmission analysisSubmission)
Prepares the givenAnalysisSubmission
to be executed within an execution manager.java.util.concurrent.Future<AnalysisSubmission>
transferAnalysisResults(AnalysisSubmission submittedAnalysis)
Downloads and saves the results of anAnalysisSubmission
that was previously submitted from an execution manager.
-
-
-
Method Detail
-
prepareSubmission
java.util.concurrent.Future<AnalysisSubmission> prepareSubmission(AnalysisSubmission analysisSubmission) throws IridaWorkflowNotFoundException, java.io.IOException, ExecutionManagerException
Prepares the givenAnalysisSubmission
to be executed within an execution manager. This will persist the submission within the database.- Parameters:
analysisSubmission
- TheAnalysisSubmission
to prepare.- Returns:
- A
Future
of typeAnalysisSubmission
which can be used to access the prepared submission. - Throws:
IridaWorkflowNotFoundException
- If there was an issue getting a workflow.java.io.IOException
- If there was an issue reading the workflow.ExecutionManagerException
- If there was an issue preparing a workspace for the workflow.
-
executeAnalysis
java.util.concurrent.Future<AnalysisSubmission> executeAnalysis(AnalysisSubmission analysisSubmission) throws IridaWorkflowException, ExecutionManagerException, java.io.IOException
Executes the passed preparedAnalysisSubmission
in an execution manager.- Parameters:
analysisSubmission
- TheAnalysisSubmission
to execute.- Returns:
- A
Future
with anAnalysisSubmission
for the analysis submitted. - Throws:
ExecutionManagerException
- If there was an exception submitting the analysis to the execution manager.IridaWorkflowException
- If there was an issue with the IRIDA workflow.java.io.IOException
- If there was an error reading some of the input files.
-
getWorkflowStatus
GalaxyWorkflowStatus getWorkflowStatus(AnalysisSubmission submittedAnalysis) throws ExecutionManagerException
Gets the status for the given submitted analysis.- Parameters:
submittedAnalysis
- TheAnalysisSubmission
to check the status in the execution manager.- Returns:
- A WorkflowStatus object containing the status of the analysis.
- Throws:
ExecutionManagerException
- If there was an issue checking the status.
-
transferAnalysisResults
java.util.concurrent.Future<AnalysisSubmission> transferAnalysisResults(AnalysisSubmission submittedAnalysis) throws ExecutionManagerException, IridaWorkflowNotFoundException, java.io.IOException, IridaWorkflowAnalysisTypeException
Downloads and saves the results of anAnalysisSubmission
that was previously submitted from an execution manager.- Parameters:
submittedAnalysis
- AnAnalysisSubmission
that was previously submitted.- Returns:
- A
Future
with anAnalysisSubmission
object containing information about the particular analysis. - Throws:
ExecutionManagerException
- If there was an issue with the execution manager.IridaWorkflowNotFoundException
- If the workflow for this submission could not be found in IRIDA.java.io.IOException
- If there was an error loading the analysis results from an execution manager.IridaWorkflowAnalysisTypeException
- If there was an issue building anAnalysis
object.
-
postProcessResults
java.util.concurrent.Future<AnalysisSubmission> postProcessResults(AnalysisSubmission analysisSubmission)
Performs any post processing required for anAnalysisSubmission
. Usually this will be a sample updater implementation.- Parameters:
analysisSubmission
- theAnalysisSubmission
to process- Returns:
- a Future
AnalysisSubmission
-
cleanupSubmission
java.util.concurrent.Future<AnalysisSubmission> cleanupSubmission(AnalysisSubmission analysisSubmission) throws ExecutionManagerException
Cleans up any intermediate files in the execution manager for this submission.- Parameters:
analysisSubmission
- TheAnalysisSubmission
to clean.- Returns:
- The cleaned-up
AnalysisSubmission
. - Throws:
ExecutionManagerException
- If there was an issue with the execution manager.
-
getCapacity
int getCapacity()
Get theAnalysisExecutionService
capacity for running new jobs. This will return the number of open slots for running new workflows. NOTE: This is not a hard limit. It just reports the number running vs configured maximum requested.- Returns:
- the number of available slots for running jobs
-
-