Search in sources :

Example 1 with SageCommand

use of com.hartwig.pipeline.calling.sage.SageCommand in project pipeline5 by hartwigmedical.

the class SageCreatePon method execute.

@Override
public VirtualMachineJobDefinition execute(final InputBundle inputs, final RuntimeBucket runtimeBucket, final BashStartupScript startupScript, final RuntimeFiles executionFlags) {
    final String output = String.format("%s/SAGE.pon.vcf.gz", VmDirectories.OUTPUT);
    final BashCommand sageCommand = new SageCommand("com.hartwig.hmftools.sage.pon.PonApplication", "100G", "-in", VmDirectories.INPUT, "-out", output, "-threads", Bash.allCpus());
    // Download required resources
    // startupScript.addCommand(() -> format("gsutil -u hmf-crunch cp %s %s",
    // "gs://batch-sage-validation/resources/sage.jar",
    // "/opt/tools/sage/" + Versions.SAGE + "/sage.jar"));
    // Download germline VCFS (and indexes)
    startupScript.addCommand(() -> format("gsutil -u hmf-crunch -m cp %s %s", "gs://batch-sage/*/sage/*.sage.somatic.vcf.gz", VmDirectories.INPUT));
    startupScript.addCommand(() -> format("gsutil -u hmf-crunch -m cp %s %s", "gs://batch-sage/*/sage/*.sage.somatic.vcf.gz.tbi", VmDirectories.INPUT));
    // Run Pon Generator
    startupScript.addCommand(sageCommand);
    // Store output
    startupScript.addCommand(new OutputUpload(GoogleStorageLocation.of(runtimeBucket.name(), "sage"), executionFlags));
    return VirtualMachineJobDefinition.sageSomaticCalling(startupScript, ResultsDirectory.defaultDirectory());
}
Also used : OutputUpload(com.hartwig.pipeline.execution.vm.OutputUpload) BashCommand(com.hartwig.pipeline.execution.vm.BashCommand) SageCommand(com.hartwig.pipeline.calling.sage.SageCommand)

Aggregations

SageCommand (com.hartwig.pipeline.calling.sage.SageCommand)1 BashCommand (com.hartwig.pipeline.execution.vm.BashCommand)1 OutputUpload (com.hartwig.pipeline.execution.vm.OutputUpload)1