public void run()

in src/main/java/com/epam/fonda/workflow/impl/DnaVarBamWorkflow.java [58:81]


    public void run(final Configuration configuration, final BamFileSample sample) throws IOException {
        if (DnaUtils.isNotCaseOrTumor(sample.getSampleType())) {
            return;
        }
        sample.createDirectory();
        configuration.setCustTask("variantDetection");
        final BamResult bamResult = buildBamResult(sample);

        final String cmd = new SecondaryAnalysis(bamResult, sample.getName(), sample.getSampleOutputDir(),
                sample.getControlName(), isPaired(sample.getControlName()), scriptManager)
                .process(flag, configuration, TEMPLATE_ENGINE);
        final String resultCmd = configuration.isMasterMode()
                ? cmd
                : cmd + cleanUpTmpDir(bamResult.getCommand().getTempDirs());
        final String custScript = configuration.isMasterMode() && StringUtils.isBlank(cmd)
                ? StringUtils.EMPTY
                : printShell(configuration, resultCmd, sample.getName(), null);
        if (scriptManager != null) {
            scriptManager.addScript(sample.getName(), ALIGNMENT, custScript);
            bamResult.getCommand().getTempDirs().forEach(t -> scriptManager.addScript(sample.getName(), TEMP, t));
        }

        log.debug(String.format("Successful Step: the %s sample was processed.", sample.getName()));
    }