Class AnalysisExecutionServiceGalaxyAsync
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.analysis.execution.galaxy.AnalysisExecutionServiceGalaxyAsync
-
@Async("analysisTaskExecutor") public class AnalysisExecutionServiceGalaxyAsync extends java.lang.Object
Service for executingAnalysisSubmission
stages within a Galaxy execution manager asynchronously.
-
-
Constructor Summary
Constructors Constructor Description AnalysisExecutionServiceGalaxyAsync(AnalysisSubmissionService analysisSubmissionService, AnalysisService analysisService, GalaxyWorkflowService galaxyWorkflowService, AnalysisWorkspaceServiceGalaxy workspaceService, IridaWorkflowsService iridaWorkflowsService, AnalysisSubmissionSampleProcessor analysisSubmissionSampleService)
Builds a newAnalysisExecutionServiceGalaxyAsync
with the given information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.Future<AnalysisSubmission>
executeAnalysis(AnalysisSubmission analysisSubmission)
Executes the passed preparedAnalysisSubmission
in an execution manager.java.util.concurrent.Future<AnalysisSubmission>
postProcessResults(AnalysisSubmission analysisSubmission)
Calls theAnalysisSubmissionSampleProcessor
to perform any post processing required on a givenAnalysisSubmission
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.
-
-
-
Constructor Detail
-
AnalysisExecutionServiceGalaxyAsync
@Autowired public AnalysisExecutionServiceGalaxyAsync(AnalysisSubmissionService analysisSubmissionService, AnalysisService analysisService, GalaxyWorkflowService galaxyWorkflowService, AnalysisWorkspaceServiceGalaxy workspaceService, IridaWorkflowsService iridaWorkflowsService, AnalysisSubmissionSampleProcessor analysisSubmissionSampleService)
Builds a newAnalysisExecutionServiceGalaxyAsync
with the given information.- Parameters:
analysisSubmissionService
- A service for analysis submissions.analysisService
- A service for analysis results.galaxyWorkflowService
- A service for Galaxy workflows.workspaceService
- A service for a workflow workspace.iridaWorkflowsService
- A service for loading upIridaWorkflow
s.analysisSubmissionSampleService
- A service to updating samples associated with a submission with the analysis results.
-
-
Method Detail
-
prepareSubmission
@Transactional public 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
with anAnalysisSubmission
for the analysis submitted. - 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
public java.util.concurrent.Future<AnalysisSubmission> executeAnalysis(AnalysisSubmission analysisSubmission) throws ExecutionManagerException, IridaWorkflowException, 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.
-
transferAnalysisResults
@Transactional public java.util.concurrent.Future<AnalysisSubmission> transferAnalysisResults(AnalysisSubmission submittedAnalysis) throws ExecutionManagerException, java.io.IOException, IridaWorkflowNotFoundException, 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
@Transactional public java.util.concurrent.Future<AnalysisSubmission> postProcessResults(AnalysisSubmission analysisSubmission)
Calls theAnalysisSubmissionSampleProcessor
to perform any post processing required on a givenAnalysisSubmission
- Parameters:
analysisSubmission
- theAnalysisSubmission
to process- Returns:
- a Future
AnalysisSubmission
-
-