@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 { 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); }
CommandInput commandInput = new CommandInput(); File mapseqTmpDir = new File(System.getenv("MAPSEQ_HOME"), "tmp"); commandInput.setWorkDir(mapseqTmpDir); StringBuilder command = new StringBuilder(); command.append(String.format(getModuleClass().getAnnotation(Executable.class).value(),
CommandInput commandInput = new CommandInput(); File mapseqTmpDir = new File(System.getenv("MAPSEQ_HOME"), "tmp"); commandInput.setWorkDir(mapseqTmpDir); StringBuilder command = new StringBuilder(); command.append(String.format(getModuleClass().getAnnotation(Executable.class).value(),
@Override public ModuleOutput call() throws ModuleException { logger.debug("ENTERING call()"); CommandOutput commandOutput; try { StringBuilder command = new StringBuilder(); command.append(getModuleClass().getAnnotation(Executable.class).value()); command.append(" ").append(regularExpression); command.append(" > ").append(outputFile.getAbsolutePath()); CommandInput commandInput = new CommandInput(); commandInput.setWorkDir(directory); commandInput.setCommand(command.toString()); Executor executor = BashExecutor.getInstance(); commandOutput = executor.execute(commandInput, new File(System.getProperty("user.home"), ".mapseqrc")); if (mimeType != null) { FileData fileData = new FileData(); fileData.setName(outputFile.getName()); fileData.setMimeType(mimeType); addFileData(fileData); } } catch (ExecutorException e) { throw new ModuleException(e); } return new ShellModuleOutput(commandOutput); }
CommandInput commandInput = new CommandInput(); File mapseqTmpDir = new File(System.getenv("MAPSEQ_HOME"), "tmp"); commandInput.setWorkDir(mapseqTmpDir); StringBuilder command = new StringBuilder(); command.append(String.format(getModuleClass().getAnnotation(Executable.class).value(),
@Override public ModuleOutput call() throws ModuleException { CommandInput commandInput = new CommandInput(); StringBuilder command = new StringBuilder(); command.append(getModuleClass().getAnnotation(Executable.class).value()); if (threads != null) { try { command.append(" "); command.append(getModuleClass().getDeclaredField("threads").getAnnotation(InputArgument.class).flag()); command.append(" "); command.append(threads); } catch (Exception e) { throw new ModuleException(e); } } if (StringUtils.isNotEmpty(target)) { command.append(" ").append(target); } commandInput.setCommand(command.toString()); commandInput.setWorkDir(this.workDir); 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); }
commandInput.setWorkDir(mapseqTmpDir); StringBuilder command = new StringBuilder(); command.append(String.format(getModuleClass().getAnnotation(Executable.class).value(),
commandInput.setWorkDir(mapseqTmpDir); StringBuilder command = new StringBuilder(); command.append(String.format(getModuleClass().getAnnotation(Executable.class).value(),
commandInput.setWorkDir(workDir); CommandOutput commandOutput; Executor executor = BashExecutor.getInstance();
commandInput.setWorkDir(workDir); CommandOutput commandOutput; Executor executor = BashExecutor.getInstance();
commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s Project NCGENES", irodsHome, ncgenesIRODSDirectory)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); registrationCommand)); commandInput.setCommand(registerCommandSB.toString()); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s FileType %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), bean.getType())); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s DxID %s NCGENES", irodsHome,
commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s Project NCGENES", irodsHome, ncgenesIRODSDirectory)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); registrationCommand)); commandInput.setCommand(registerCommandSB.toString()); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s FileType %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), bean.getType())); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); ncgenesIRODSDirectory, bean.getFile().getName(),
CommandInput commandInput = new CommandInput(); commandInput.setCommand(String.format("%s/bin/imkdir -p %s", irodsHome, ncgenesIRODSDirectory)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s Project NCGENES", irodsHome, ncgenesIRODSDirectory)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); registrationCommand)); commandInput.setCommand(registerCommandSB.toString()); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s FileType %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), bean.getType())); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput);
CommandInput commandInput = new CommandInput(); commandInput.setCommand(String.format("%s/bin/imkdir -p %s", irodsHome, ncgenesIRODSDirectory)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s Project NCGENES", irodsHome, ncgenesIRODSDirectory)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -C %s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); registrationCommand)); commandInput.setCommand(registerCommandSB.toString()); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s ParticipantID %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), participantId)); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput); commandInput.setCommand(String.format("%s/bin/imeta add -d %s/%s FileType %s NCGENES", irodsHome, ncgenesIRODSDirectory, bean.getFile().getName(), bean.getType())); commandInput.setWorkDir(tmpDir); commandInputList.add(commandInput);