use of com.hartwig.pipeline.execution.vm.InputDownload in project pipeline5 by hartwigmedical.
the class PurpleGermline method bashCommands.
public List<BashCommand> bashCommands(final InputBundle inputs) {
final List<BashCommand> commands = Lists.newArrayList();
final ResourceFiles resourceFiles = ResourceFilesFactory.buildResourceFiles(RefGenomeVersion.V37);
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 sageVcfStorage = sageSomaticFilteredFile(set, tumorSampleName);
final GoogleStorageLocation sageIndexStorage = index(sageVcfStorage);
// gripssSomaticFilteredFile(set, tumorSampleName);
final GoogleStorageLocation gripssVcfStorage = null;
// index(gripssVcfStorage);
final GoogleStorageLocation gripssVcfIndexStorage = null;
// gripssRecoveryFile(set, tumorSampleName);
final GoogleStorageLocation gripssRecoveryVcfStorage = null;
final GoogleStorageLocation gripssRecoveryVcfIndexStorage = index(gripssRecoveryVcfStorage);
final String amberInputDir = VmDirectories.INPUT + "/amber";
final String cobaltInputDir = VmDirectories.INPUT + "/cobalt";
final InputDownload amberLocation = new InputDownload(amberArchiveDirectory(set), amberInputDir);
final InputDownload cobaltLocation = new InputDownload(cobaltArchiveDirectory(set), cobaltInputDir);
final InputDownload sageLocation = new InputDownload(sageVcfStorage);
final InputDownload sageLocationIndex = new InputDownload(sageIndexStorage);
final InputDownload gripssLocation = new InputDownload(gripssVcfStorage);
final InputDownload gripssLocationIndex = new InputDownload(gripssVcfIndexStorage);
final InputDownload gripssRecoveryLocation = new InputDownload(gripssRecoveryVcfStorage);
final InputDownload gripssRecoveryLocationIndex = new InputDownload(gripssRecoveryVcfIndexStorage);
final String germlineVcf = VmDirectories.INPUT + "/" + tumorSampleName + ".sage.germline.filtered.vcf.gz";
// gsutil ls gs://batch-sage-germline/*/sage/WIDE01010012T*germline.filtered.vcf.gz*
commands.add(() -> String.format("gsutil -m cp gs://batch-sage-germline/*/sage/%s*germline.filtered.vcf.gz* %s/", tumorSampleName, VmDirectories.INPUT));
commands.add(() -> "mkdir -p " + amberInputDir);
commands.add(() -> "mkdir -p " + cobaltInputDir);
// commands.add(downloadExperimentalVersion());
commands.add(amberLocation);
commands.add(cobaltLocation);
commands.add(sageLocation);
commands.add(sageLocationIndex);
commands.add(gripssLocation);
commands.add(gripssLocationIndex);
commands.add(gripssRecoveryLocation);
commands.add(gripssRecoveryLocationIndex);
BashCommand purpleCommand = new PurpleCommandBuilder(resourceFiles, amberLocation.getLocalTargetPath(), cobaltLocation.getLocalTargetPath(), tumorSampleName, gripssLocation.getLocalTargetPath(), gripssRecoveryLocation.getLocalTargetPath(), sageLocation.getLocalTargetPath()).addGermline(germlineVcf).build();
commands.add(purpleCommand);
return commands;
}
Aggregations