public void run()

in src/main/java/com/epam/fonda/workflow/impl/TcrRepertoireFastqWorkflow.java [53:77]


    public void run(Configuration configuration, FastqFileSample sample) throws IOException {
        if (!sample.getType().getType().equals("paired") || sample.getFastq1().size() != sample.getFastq2().size()) {
            throw new IllegalArgumentException(
                ("Error Step: Fastqs_1 and Fastqs_2 have different number of individual fastq files, please check!"));
        }
        sample.createDirectory();
        configuration.setCustTask("TCR_detection");
        FastqResult fastqResult = PipelineUtils.mergeFastq(sample);
        fastqResult = new PreAlignment(fastqResult).process(flag, sample, configuration, TEMPLATE_ENGINE);
        Set<String> tmpDir = fastqResult.getCommand().getTempDirs();
        StringBuilder cmd = new StringBuilder(fastqResult.getCommand().getToolCommand());
        if (flag.isMixcr()) {
            MixcrResult generate = new Mixcr(sample, fastqResult).generate(configuration, TEMPLATE_ENGINE);
            cmd.append(generate.getCommand().getToolCommand());
        }
        final String command = configuration.isMasterMode()
                ? cmd.toString()
                : cmd.append(cleanUpTmpDir(tmpDir)).toString();
        final String custScript = printShell(configuration, command, sample.getName(), null);
        if (scriptManager != null) {
            scriptManager.addScript(sample.getName(), ALIGNMENT, custScript);
            tmpDir.forEach(t -> scriptManager.addScript(sample.getName(), TEMP, t));
        }
        log.debug(String.format("Successful Step: the %s sample was processed.", sample.getName()));
    }