Search in sources :

Example 1 with CobaltMigrationCommand

use of com.hartwig.pipeline.tertiary.cobalt.CobaltMigrationCommand in project pipeline5 by hartwigmedical.

the class CobaltMigration method execute.

@Override
public VirtualMachineJobDefinition execute(final InputBundle inputs, final RuntimeBucket runtimeBucket, final BashStartupScript commands, final RuntimeFiles executionFlags) {
    // Inputs
    final String set = inputs.get("set").inputValue();
    final String tumorSampleName = inputs.get("tumor_sample").inputValue();
    final String referenceSampleName = inputs.get("ref_sample").inputValue();
    final GoogleStorageLocation remoteInputDirectory = cobaltArchiveDirectoryInput(set);
    // Download old files
    commands.addCommand(() -> copyInputCommand(remoteInputDirectory));
    final ResourceFiles resourceFiles = ResourceFilesFactory.buildResourceFiles(RefGenomeVersion.V37);
    commands.addCommand(() -> new CobaltMigrationCommand(resourceFiles, referenceSampleName, tumorSampleName).asBash());
    // Store output
    final GoogleStorageLocation archiveStorageLocation = cobaltArchiveDirectoryOutput(set);
    commands.addCommand(new CopyLogToOutput(executionFlags.log(), "run.log"));
    commands.addCommand(new OutputUpload(archiveStorageLocation));
    return VirtualMachineJobDefinition.cobalt(commands, ResultsDirectory.defaultDirectory());
}
Also used : ResourceFiles(com.hartwig.pipeline.resource.ResourceFiles) OutputUpload(com.hartwig.pipeline.execution.vm.OutputUpload) CobaltMigrationCommand(com.hartwig.pipeline.tertiary.cobalt.CobaltMigrationCommand) CopyLogToOutput(com.hartwig.pipeline.execution.vm.CopyLogToOutput) GoogleStorageLocation(com.hartwig.pipeline.storage.GoogleStorageLocation)

Aggregations

CopyLogToOutput (com.hartwig.pipeline.execution.vm.CopyLogToOutput)1 OutputUpload (com.hartwig.pipeline.execution.vm.OutputUpload)1 ResourceFiles (com.hartwig.pipeline.resource.ResourceFiles)1 GoogleStorageLocation (com.hartwig.pipeline.storage.GoogleStorageLocation)1 CobaltMigrationCommand (com.hartwig.pipeline.tertiary.cobalt.CobaltMigrationCommand)1