Search in sources :

Example 1 with RefGenome37ResourceFiles

use of com.hartwig.pipeline.resource.RefGenome37ResourceFiles in project pipeline5 by hartwigmedical.

the class PurpleTest method shallowModeUsesLowDepthSettings.

@Test
public void shallowModeUsesLowDepthSettings() {
    Purple victim = new Purple(new RefGenome37ResourceFiles(), TestInputs.paveSomaticOutput(), TestInputs.paveGermlineOutput(), TestInputs.gripssSomaticProcessOutput(), TestInputs.amberOutput(), TestInputs.cobaltOutput(), new NoopPersistedDataset(), Arguments.testDefaultsBuilder().shallow(true).build());
    assertThat(victim.tumorReferenceCommands(input()).get(0).asBash()).contains("-highly_diploid_percentage 0.88 -somatic_min_purity_spread 0.1");
}
Also used : RefGenome37ResourceFiles(com.hartwig.pipeline.resource.RefGenome37ResourceFiles) NoopPersistedDataset(com.hartwig.pipeline.reruns.NoopPersistedDataset) TertiaryStageTest(com.hartwig.pipeline.tertiary.TertiaryStageTest) Test(org.junit.Test)

Example 2 with RefGenome37ResourceFiles

use of com.hartwig.pipeline.resource.RefGenome37ResourceFiles in project pipeline5 by hartwigmedical.

the class SamtoolsBamToCram method execute.

@Override
public VirtualMachineJobDefinition execute(final InputBundle inputs, final RuntimeBucket bucket, final BashStartupScript startupScript, final RuntimeFiles executionFlags) {
    InputFileDescriptor input = inputs.get();
    String outputFile = VmDirectories.outputFile(new File(input.inputValue()).getName().replaceAll("\\.bam$", ".cram"));
    String localInput = format("%s/%s", VmDirectories.INPUT, new File(input.inputValue()).getName());
    startupScript.addCommand(() -> input.toCommandForm(localInput));
    startupScript.addCommands(new CramAndValidateCommands(localInput, outputFile, new RefGenome37ResourceFiles()).commands());
    startupScript.addCommand(new MvCommand("/data/output/*.bam", "/data/tmp"));
    startupScript.addCommand(new MvCommand("/data/output/*.bam.flagstat", "/data/tmp"));
    startupScript.addCommand(new OutputUpload(GoogleStorageLocation.of(bucket.name(), "samtools"), executionFlags));
    return VirtualMachineJobDefinition.builder().name("samtoolscram").startupCommand(startupScript).namespacedResults(ResultsDirectory.defaultDirectory()).workingDiskSpaceGb(650).performanceProfile(VirtualMachinePerformanceProfile.custom(6, 6)).build();
}
Also used : CramAndValidateCommands(com.hartwig.pipeline.cram.CramAndValidateCommands) OutputUpload(com.hartwig.pipeline.execution.vm.OutputUpload) InputFileDescriptor(com.hartwig.batch.input.InputFileDescriptor) RefGenome37ResourceFiles(com.hartwig.pipeline.resource.RefGenome37ResourceFiles) MvCommand(com.hartwig.pipeline.execution.vm.unix.MvCommand) File(java.io.File)

Example 3 with RefGenome37ResourceFiles

use of com.hartwig.pipeline.resource.RefGenome37ResourceFiles in project pipeline5 by hartwigmedical.

the class SambambaCramaBam method execute.

@Override
public VirtualMachineJobDefinition execute(final InputBundle inputs, final RuntimeBucket bucket, final BashStartupScript startupScript, final RuntimeFiles executionFlags) {
    InputFileDescriptor input = inputs.get();
    String outputFile = VmDirectories.outputFile(new File(input.inputValue()).getName().replaceAll("\\.bam$", ".cram"));
    String localInput = String.format("%s/%s", VmDirectories.INPUT, new File(input.inputValue()).getName());
    startupScript.addCommand(() -> input.toCommandForm(localInput));
    final RefGenome37ResourceFiles resourceFiles = new RefGenome37ResourceFiles();
    startupScript.addCommand(new VersionedToolCommand("sambamba", "sambamba", Versions.SAMBAMBA, "view", localInput, "-o", outputFile, "-t", Bash.allCpus(), "--format=cram", "-T", resourceFiles.refGenomeFile()));
    startupScript.addCommand(new OutputUpload(GoogleStorageLocation.of(bucket.name(), "cram"), executionFlags));
    return VirtualMachineJobDefinition.builder().name("cram").startupCommand(startupScript).namespacedResults(ResultsDirectory.defaultDirectory()).performanceProfile(VirtualMachinePerformanceProfile.custom(4, 6)).build();
}
Also used : OutputUpload(com.hartwig.pipeline.execution.vm.OutputUpload) InputFileDescriptor(com.hartwig.batch.input.InputFileDescriptor) RefGenome37ResourceFiles(com.hartwig.pipeline.resource.RefGenome37ResourceFiles) File(java.io.File) VersionedToolCommand(com.hartwig.pipeline.calling.command.VersionedToolCommand)

Aggregations

RefGenome37ResourceFiles (com.hartwig.pipeline.resource.RefGenome37ResourceFiles)3 InputFileDescriptor (com.hartwig.batch.input.InputFileDescriptor)2 OutputUpload (com.hartwig.pipeline.execution.vm.OutputUpload)2 File (java.io.File)2 VersionedToolCommand (com.hartwig.pipeline.calling.command.VersionedToolCommand)1 CramAndValidateCommands (com.hartwig.pipeline.cram.CramAndValidateCommands)1 MvCommand (com.hartwig.pipeline.execution.vm.unix.MvCommand)1 NoopPersistedDataset (com.hartwig.pipeline.reruns.NoopPersistedDataset)1 TertiaryStageTest (com.hartwig.pipeline.tertiary.TertiaryStageTest)1 Test (org.junit.Test)1