@Override public ModuleOutput call() throws ModuleException { CommandInput commandInput = new CommandInput(); StringBuilder command = new StringBuilder(); command.append(getModuleClass().getAnnotation(Executable.class).value()); command.append(" ").append(inFile.getAbsolutePath()); command.append(" ").append(outFile.getAbsolutePath()); command.append(" ").append(transcriptDB.getAbsolutePath()); command.append(" ").append(sqHeader.getAbsolutePath()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
public static BashExecutor getInstance() { if (instance == null) { return new BashExecutor(); } return instance; }
public CommandOutput execute(CommandInput input) throws ExecutorException { return execute(input, (File[]) null); } }
String[] env = null; if (input.getEnvironment() != null) { env = environmentToArray(input.getEnvironment());
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); Properties readLengthProperties = new Properties(); FileInputStream fis = new FileInputStream(this.readLength); readLengthProperties.loadFromXML(fis); fis.close(); StringBuilder command = new StringBuilder(getExecutable()); command.append(" ").append(junction.getAbsolutePath()); command.append(" ").append(readLengthProperties.getProperty("maxLength")); command.append(" ").append(minimumAnchor.toString()); command.append(" ").append(referenceSequenceDirectory.getAbsolutePath()); command.append(" ").append(sam.getAbsolutePath()); CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); StringBuilder command = new StringBuilder(getExecutable()); command.append(" ").append(input.getAbsolutePath()); command.append(" ").append(outputDirectory.getAbsolutePath()); if (this.outputDirectory.isDirectory() && !this.outputDirectory.getAbsolutePath().endsWith("/")) { command.append("/"); } CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); StringBuilder command = new StringBuilder(getExecutable()); command.append(" ").append(this.minimumAnchorWidth.toString()); command.append(" ").append(this.maximumAnchor.toString()); command.append(" ").append(this.maximumThresholdEach.toString()); command.append(" ").append(this.maximumThresholdTotal.toString()); command.append(" ").append(this.junction.getAbsolutePath()); command.append(" 1"); command.append(" ").append(this.fusionJunction.getAbsolutePath()); command.append(" 1"); command.append(" ").append(this.referenceSequenceDirectory.getAbsolutePath()); if (this.referenceSequenceDirectory.isDirectory() && !this.referenceSequenceDirectory.getAbsolutePath().endsWith("/")) { command.append("/"); } command.append(" ").append(this.output.getAbsolutePath()); CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); StringBuilder command = new StringBuilder(getExecutable()); command.append(" ").append(this.minimumAnchor.toString()); command.append(" ").append(this.maximumAnchor.toString()); command.append(" ").append(this.maximumSequenceThreshold.toString()); command.append(" ").append(this.junction.getAbsolutePath()); command.append(" ").append(this.referenceSequenceDirectory.getAbsolutePath()); if (this.referenceSequenceDirectory.isDirectory() && !this.referenceSequenceDirectory.getAbsolutePath().endsWith("/")) { command.append("/"); } command.append(" ").append(this.output.getAbsolutePath()); CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); StringBuilder command = new StringBuilder(getExecutable()); command.append(" ").append(junctionFile.getAbsolutePath()); Properties readLengthProperties = new Properties(); FileInputStream fis = new FileInputStream(readLength); readLengthProperties.loadFromXML(fis); fis.close(); command.append(" ").append(readLengthProperties.getProperty("maxLength")); command.append(" ").append(chromosomeFilesDirectory.getAbsolutePath()); command.append(" ").append(minimumIntron); command.append(" ").append(maximumIntron); command.append(" ").append(minimumAnchor); for (File f : input) { command.append(" ").append(f.getAbsolutePath()); } CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { CommandInput commandInput = new CommandInput(); StringBuilder command = new StringBuilder(); command.append(getModuleClass().getAnnotation(Executable.class).value()); command.append(" -c ").append(column.toString()); command.append(" -q ").append(quantile.toString()); command.append(" -t ").append(target.toString()); command.append(" -o ").append(output.getAbsolutePath()); command.append(" ").append(input.getAbsolutePath()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); StringBuilder command = new StringBuilder(getExecutable()); command.append(" ").append(clusterDirectory.getAbsolutePath()).append("/"); CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { CommandInput commandInput = new CommandInput(); StringBuilder commandSB = new StringBuilder(); commandSB.append(this.executable); if (argument != null) { for (String arg : argument) { commandSB.append(String.format(" %s", arg)); } } commandInput.setCommand(commandSB.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws ModuleException { File userHome = new File(System.getProperty("user.home")); CommandInput commandInput = new CommandInput(); StringBuilder command = new StringBuilder(); command.append(String.format(getModuleClass().getAnnotation(Executable.class).value())); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(userHome, ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); StringBuilder command = new StringBuilder(getExecutable()); command.append(" ").append(output.getAbsolutePath()); if (fastq) { command.append(" 1"); } command.append(" ").append(input.getAbsolutePath()); CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) {
@Override public ModuleOutput call() throws Exception { logger.debug("ENTERING call()"); StringBuilder command = new StringBuilder(getExecutable()); if (this.bufferSize != null) { command.append(" -S ").append(this.bufferSize.toString()); } if (StringUtils.isNotEmpty(this.key)) { command.append(" -k ").append(this.key); } if (this.tmpDirectory != null && this.tmpDirectory.exists()) { command.append(" -T ").append(this.tmpDirectory.getAbsolutePath()); } command.append(" -o ").append(this.output.getAbsolutePath()); for (File f : input) { command.append(" ").append(f.getAbsolutePath()); } CommandInput commandInput = new CommandInput(); logger.info("command.toString(): {}", command.toString()); commandInput.setCommand(command.toString()); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws ModuleException { CommandOutput commandOutput = null; try { StringBuilder command = new StringBuilder(); command.append("/bin/ln -s ").append(fastaDB).append(" ").append(symlinkFile.getAbsolutePath()).append(";"); command.append(String.format("$%s_%s", getWorkflowName().toUpperCase(), getModuleClass().getAnnotation(Executable.class).value())); command.append(" ") .append(getModuleClass().getDeclaredField("algorithm").getAnnotation(InputArgument.class).flag()) .append(" ").append(algorithm.getValue()); command.append(" ").append(symlinkFile.getAbsolutePath()); CommandInput commandInput = new CommandInput(); File mapseqTmpDir = new File(System.getenv("MAPSEQ_HOME"), "tmp"); commandInput.setWorkDir(mapseqTmpDir); commandInput.setCommand(command.toString()); Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (Exception e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
@Override public ModuleOutput call() throws ModuleException { CommandInput commandInput = new CommandInput(); commandInput.setCommand(String.format(getModuleClass().getAnnotation(Executable.class).value(), getWorkflowName().toUpperCase(), input.getAbsolutePath(), output.getAbsolutePath())); CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
CommandOutput commandOutput; try { Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (ExecutorException e) {
@Override public ModuleOutput call() throws ModuleException { CommandOutput commandOutput = null; try { StringBuilder command = new StringBuilder(); command.append("/bin/ln -s ").append(fastaDB).append(" ").append(symlinkFile.getAbsolutePath()).append(";"); command.append(String.format("$%s_%s", getWorkflowName().toUpperCase(), getModuleClass().getAnnotation(Executable.class).value())); command.append(" ") .append(getModuleClass().getDeclaredField("algorithm").getAnnotation(InputArgument.class).flag()) .append(" ").append(algorithm.getValue()); command.append(" ").append(symlinkFile.getAbsolutePath()); CommandInput commandInput = new CommandInput(); File mapseqTmpDir = new File(System.getenv("MAPSEQ_HOME"), "tmp"); commandInput.setWorkDir(mapseqTmpDir); commandInput.setCommand(command.toString()); Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); } catch (Exception e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }