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