use of com.hartwig.pipeline.execution.vm.BashCommand in project pipeline5 by hartwigmedical.
the class SageSomaticPostProcess method bash.
@Override
public List<BashCommand> bash(final OutputFile input, final OutputFile output) {
final List<BashCommand> result = Lists.newArrayList();
SubStage passFilter = new PassFilter();
OutputFile finalOutputFile = OutputFile.of(tumorSampleName.sampleName(), SAGE_SOMATIC_FILTERED, FileTypes.GZIPPED_VCF);
result.addAll(passFilter.bash(input, finalOutputFile));
return result;
}
use of com.hartwig.pipeline.execution.vm.BashCommand in project pipeline5 by hartwigmedical.
the class BcfToolsCommandListBuilder method bcfCommand.
@VisibleForTesting
BashCommand bcfCommand() {
if (currentArguments == null) {
throw new IllegalStateException("No bcftools command added.");
}
final List<BashCommand> finalCommands = Lists.newArrayList(pipedCommands);
final BashCommand finalCommand = new BcfToolsCommand(currentArguments, "-O", "z", "-o", outputVcf);
finalCommands.add(finalCommand);
return new PipeCommands(finalCommands.toArray(new BashCommand[0]));
}
use of com.hartwig.pipeline.execution.vm.BashCommand in project pipeline5 by hartwigmedical.
the class GermlineCaller method germlineCallerCommands.
public List<BashCommand> germlineCallerCommands(final SingleSampleRunMetadata metadata) {
String referenceFasta = resourceFiles.refGenomeFile();
SubStageInputOutput callerOutput = new GatkGermlineCaller(bamDownload.getLocalTargetPath(), referenceFasta).andThen(new GenotypeGVCFs(referenceFasta)).apply(SubStageInputOutput.empty(metadata.sampleName()));
SubStageInputOutput snpFilterOutput = new SelectVariants("snp", Lists.newArrayList("SNP", "NO_VARIATION"), referenceFasta).andThen(new VariantFiltration("snp", SNP_FILTER_EXPRESSION, referenceFasta)).apply(callerOutput);
SubStageInputOutput indelFilterOutput = new SelectVariants("indels", Lists.newArrayList("INDEL", "MIXED"), referenceFasta).andThen(new VariantFiltration("indels", INDEL_FILTER_EXPRESSION, referenceFasta)).apply(SubStageInputOutput.of(metadata.sampleName(), callerOutput.outputFile(), Collections.emptyList()));
SubStageInputOutput combinedFilters = snpFilterOutput.combine(indelFilterOutput);
SubStageInputOutput finalOutput = new CombineFilteredVariants(indelFilterOutput.outputFile().path(), referenceFasta).andThen(new GermlineZipIndex()).apply(combinedFilters);
return ImmutableList.<BashCommand>builder().addAll(finalOutput.bash()).add(new MvCommand(finalOutput.outputFile().path(), outputFile.path())).add(new MvCommand(finalOutput.outputFile().path() + ".tbi", outputFile.path() + ".tbi")).build();
}
use of com.hartwig.pipeline.execution.vm.BashCommand in project pipeline5 by hartwigmedical.
the class LocalLocationsTest method testDownloadTumorAlignmentIndex.
@Test
public void testDownloadTumorAlignmentIndex() {
LocalLocations local = new LocalLocations(remoteLocations);
String alignment = local.getTumorAlignment();
List<BashCommand> commands = local.generateDownloadCommands();
assertEquals(commands.get(0).asBash(), PREFIX + "gs://alignment/171006_COLO829/COLO929v003T.cram /data/input/COLO929v003T.cram");
assertEquals(commands.get(1).asBash(), PREFIX + "gs://alignment/171006_COLO829/COLO929v003T.crai /data/input/COLO929v003T.crai");
}
use of com.hartwig.pipeline.execution.vm.BashCommand in project pipeline5 by hartwigmedical.
the class LocalLocationsTest method testDownloadReferenceAlignmentIndex.
@Test
public void testDownloadReferenceAlignmentIndex() {
LocalLocations local = new LocalLocations(remoteLocations);
String alignment = local.getReferenceAlignment();
List<BashCommand> commands = local.generateDownloadCommands();
assertEquals(commands.get(0).asBash(), PREFIX + "gs://alignment/171006_COLO829/COLO929v003R.cram /data/input/COLO929v003R.cram");
assertEquals(commands.get(1).asBash(), PREFIX + "gs://alignment/171006_COLO829/COLO929v003R.crai /data/input/COLO929v003R.crai");
}
Aggregations