private BWAAlnInstance(Mapper.Context context, String bin) throws IOException, URISyntaxException { super(context, bin); taskId = context.getTaskAttemptID().toString(); taskId = taskId.substring(taskId.indexOf("m_")); ref = HalvadeFileUtils.downloadBWAIndex(context, taskId); alnCustomArgs = HalvadeConf.getCustomArgs(context.getConfiguration(), "bwa", "aln"); }
private void startBWASamXe() throws InterruptedException { String customArgs = HalvadeConf.getCustomArgs(context.getConfiguration(), "bwa", "sampe"); String[] command = CommandGenerator.bwaSamXe( bin, ref, getFileName(tmpdir, taskId, true, 1), getFileName(tmpdir, taskId, false, 1), getFileName(tmpdir, taskId, true, 2), getFileName(tmpdir, taskId, false, 2), isPaired, threads, customArgs); samxe = new ProcessBuilderWrapper(command, bin); samxe.startProcess(null, System.err); if (!samxe.isAlive()) throw new ProcessException("BWA samXe", samxe.getExitState()); // make a SAMstream handler ssh = new SAMStreamHandler(instance, context, false); ssh.start(); }