private List<ExecutionResult> executeKatGcp( JobOutputMap jfCountOutputs, String jobPrefix, int threads, int memory, boolean runInParallel) throws InterruptedException, ProcessExecutionException, ConanParameterException { List<ExecutionResult> output = new ArrayList<>(); for (Map.Entry<String, Set<File>> entry : jfCountOutputs.entrySet()) { for (File inputFile : entry.getValue()) { File outputPrefix = new File(inputFile.getAbsolutePath() + ".kat-gcp"); File matrixFile = new File(outputPrefix + ".mx"); File plotFile = new File(matrixFile.getAbsolutePath() + ".png"); KatGcpV1 katGcpProc = this.makeKatGcpProc(inputFile, outputPrefix, threads); KatPlotDensityV1 katPlotDensityProc = this.makeKatPlotDensityProc(matrixFile, plotFile); katGcpProc.addPostCommand(katPlotDensityProc.getCommand()); ExecutionResult result = this.conanExecutorService.executeProcess( katGcpProc, inputFile.getParentFile(), jobPrefix + "-" + inputFile.getName(), threads, memory, runInParallel); output.add(result); } } return output; }