use of ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowSet in project irida by phac-nml.
the class IridaWorkflowsServiceIT method setup.
@Before
public void setup() throws IOException, URISyntaxException, IridaWorkflowException {
Path workflowVersion1DirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/TestAnalysis/1.0").toURI());
Path workflowVersion2DirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/TestAnalysis/2.0").toURI());
Path workflowPhylogenomicsDirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/AnalysisPhylogenomicsPipeline/0.1").toURI());
iridaWorkflowsService = new IridaWorkflowsService(new IridaWorkflowSet(Sets.newHashSet()), new IridaWorkflowIdSet(Sets.newHashSet()));
testWorkflow1v1 = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowVersion1DirectoryPath);
testWorkflow1v2 = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowVersion2DirectoryPath);
testWorkflowPhylogenomics = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowPhylogenomicsDirectoryPath);
}
use of ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowSet in project irida by phac-nml.
the class IridaWorkflowsConfig method iridaWorkflows.
/**
* Builds a set of workflows to load up into IRIDA.
*
* @param iridaWorkflowTypesPath
* The parent directory containing sub-directories for all IRIDA
* workflow types.
*
* @return A set of workflows to load into IRIDA.
* @throws IOException
* If an I/O error occured.
* @throws IridaWorkflowLoadException
* If there was an issue loading a specific workflow.
*/
@Bean
public IridaWorkflowSet iridaWorkflows(Path iridaWorkflowTypesPath) throws IOException, IridaWorkflowLoadException {
Set<IridaWorkflow> iridaWorkflowsSet = Sets.newHashSet();
DirectoryStream<Path> workflowTypesStream = Files.newDirectoryStream(iridaWorkflowTypesPath);
for (Path workflowTypePath : workflowTypesStream) {
if (!Files.isDirectory(workflowTypePath)) {
logger.warn("Workflow type directory " + iridaWorkflowTypesPath + " contains a file " + workflowTypePath + " that is not a proper workflow directory.");
} else {
iridaWorkflowsSet.addAll(iridaWorkflowLoaderService().loadAllWorkflowImplementations(workflowTypePath));
}
}
return new IridaWorkflowSet(iridaWorkflowsSet);
}
use of ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowSet in project irida by phac-nml.
the class IridaWorkflowsTestConfig method iridaWorkflows.
@Bean
public IridaWorkflowSet iridaWorkflows() throws IOException, IridaWorkflowLoadException, URISyntaxException {
Path testAnalysisPath = Paths.get(TestAnalysis.class.getResource("workflows/TestAnalysis").toURI());
Path phylogenomicsAnalysisPath = Paths.get(Analysis.class.getResource("workflows/AnalysisPhylogenomicsPipeline").toURI());
Path assemblyAnnotationPath = Paths.get(Analysis.class.getResource("workflows/AnalysisAssemblyAnnotation").toURI());
Set<IridaWorkflow> workflowsSet = iridaWorkflowLoaderService.loadAllWorkflowImplementations(testAnalysisPath);
workflowsSet.addAll(iridaWorkflowLoaderService.loadAllWorkflowImplementations(phylogenomicsAnalysisPath));
workflowsSet.addAll(iridaWorkflowLoaderService.loadAllWorkflowImplementations(assemblyAnnotationPath));
return new IridaWorkflowSet(workflowsSet);
}
use of ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowSet in project irida by phac-nml.
the class IridaWorkflowsServiceTest method setup.
@Before
public void setup() throws IridaWorkflowException {
iridaWorkflow = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
iridaWorkflow2 = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId2, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
iridaWorkflow3 = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId3, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
iridaWorkflowSet = new IridaWorkflowSet(Sets.newHashSet(iridaWorkflow, iridaWorkflow2));
defaultIridaWorkflowIdSet = new IridaWorkflowIdSet(Sets.newHashSet());
iridaWorkflowsService = new IridaWorkflowsService(iridaWorkflowSet, defaultIridaWorkflowIdSet);
}
Aggregations