List of usage examples for java.lang Package.Args Package.Args
Package.Args
From source file:uk.ac.tgac.citadel.CitadelPipeline.java
public void init() throws IOException { // Configure pipeline this.clearProcessList(); Args args = this.getArgs(); // Clear pipeline this.clearProcessList(); // Stage 1: Alignment File decompressDir = new File(this.args.getOutputDir(), "1-decompress"); Decompress.Args decompressArgs = new Decompress.Args(); decompressArgs.setOutputDir(decompressDir); decompressArgs.setJobPrefix(args.getJobPrefix() + "-decompress"); decompressArgs.setRunParallel(args.isRunParallel()); decompressArgs.setPaired(args.isPaired()); decompressArgs.setRecursive(args.isRecursive()); if (this.args.stages.contains(CitadelStage.DECOMPRESS)) { this.addProcess(new Decompress(this.conanExecutorService, decompressArgs)); }//from w w w .j a v a2 s .co m // Stage 2: Jellyswarm File jellyswarmDir = new File(this.args.getOutputDir(), "2-jellyswarm"); Jellyswarm.Args jellyswarmArgs = new Jellyswarm.Args(); jellyswarmArgs.setOutputDir(jellyswarmDir); jellyswarmArgs.setJobPrefix(args.getJobPrefix() + "-jellyswarm"); jellyswarmArgs.setThreads(args.getThreadsPerProcess()); jellyswarmArgs.setRunParallel(args.isRunParallel()); jellyswarmArgs.setInputDir(decompressDir); jellyswarmArgs.setLowerCount(2); jellyswarmArgs.setHashSize(400000000L); jellyswarmArgs.setPaired(args.isPaired()); if (this.args.stages.contains(CitadelStage.JELLYSWARM)) { this.addProcess(new Jellyswarm(this.conanExecutorService, jellyswarmArgs)); } // Stage 3: RAMPART (works out which samples to analyse by itself) File rampartDir = new File(this.args.getOutputDir(), "3-rampart"); Rampart.Args rampartArgs = new Rampart.Args(); rampartArgs.setOutputDir(rampartDir); rampartArgs.setJobPrefix(args.getJobPrefix() + "-rampart"); rampartArgs.setOrganism(args.getOrganism()); if (this.args.stages.contains(CitadelStage.RAMPART)) { this.addProcess(new Rampart(this.conanExecutorService, rampartArgs)); } // Stage 4: Run transdecoder on cufflinks and pasa output File assembleDir = new File(this.args.getOutputDir(), "4-assemble"); Assemble.Args assembleArgs = new Assemble.Args(); assembleArgs.setOutputDir(assembleDir); assembleArgs.setJobPrefix(args.getJobPrefix() + "-assemble"); assembleArgs.setRunParallel(args.isRunParallel()); if (this.args.stages.contains(CitadelStage.ASSEMBLE)) { this.addProcess(new Assemble(this.conanExecutorService, assembleArgs)); } // Stage 5: Annotate assemblies File annotateDir = new File(this.args.getOutputDir(), "5-annotate"); Annotate.Args annotateArgs = new Annotate.Args(); annotateArgs.setOutputDir(annotateDir); annotateArgs.setJobPrefix(args.getJobPrefix() + "-annotate"); annotateArgs.setRunParallel(args.isRunParallel()); if (this.args.stages.contains(CitadelStage.ANNOTATE)) { this.addProcess(new Annotate(this.conanExecutorService, annotateArgs)); } // Stage 5: Annotate assemblies File packageDir = new File(this.args.getOutputDir(), "6-package"); Package.Args packageArgs = new Package.Args(); packageArgs.setOutputDir(packageDir); packageArgs.setJobPrefix(args.getJobPrefix() + "-package"); packageArgs.setRunParallel(args.isRunParallel()); if (this.args.stages.contains(CitadelStage.PACKAGE)) { this.addProcess(new Package(this.conanExecutorService, packageArgs)); } // Check all processes in the pipeline are operational, modify execution context to execute unscheduled locally ExecutionContext localContext = new DefaultExecutionContext(new Local(), null, this.conanExecutorService.getExecutionContext().getExternalProcessConfiguration()); if (!this.isOperational(localContext)) { throw new IOException( "The pipeline contains one or more processes that are not currently operational. " + "Please fix before restarting pipeline."); } }