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());
}
Aggregations