예제 #1
0
  @Override
  public boolean isOperational(ExecutionContext executionContext) {

    if (!new JellyfishCountV11(this.conanExecutorService).isOperational(executionContext)) {
      log.warn("Jellyfish Count is not operational.");
      return false;
    }

    if (!new JellyfishMergeV11(this.conanExecutorService).isOperational(executionContext)) {
      log.warn("Jellyfish Merge is not operational.");
      return false;
    }

    KatGcpV1 katGcpProc = new KatGcpV1();
    katGcpProc.setConanProcessService(this.getConanProcessService());

    if (!katGcpProc.isOperational(executionContext)) {
      log.warn("KAT GCP is not operational.");
      return false;
    }

    KatPlotDensityV1 katPlotDensityProc = new KatPlotDensityV1();
    katPlotDensityProc.setConanProcessService(this.getConanProcessService());

    if (!katPlotDensityProc.isOperational(executionContext)) {
      log.warn("KAT Plot Density is not operational.");
      return false;
    }

    log.info("Read Kmer counting stage is operational.");

    return true;
  }
예제 #2
0
  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;
  }