Search in sources :

Example 6 with AlignmentOutput

use of com.hartwig.pipeline.alignment.AlignmentOutput in project pipeline5 by hartwigmedical.

the class SingleSamplePipeline method convertCramsIfNecessary.

private AlignmentOutput convertCramsIfNecessary(final Arguments arguments, final SingleSampleRunMetadata metadata, final PipelineState state) throws Exception {
    AlignmentOutput alignmentOutput = report.add(state.add(aligner.run(metadata)));
    alignmentOutput = state.shouldProceed() && !arguments.useCrams() && alignmentOutput.alignments().path().endsWith(FileTypes.CRAM) ? state.add(stageRunner.run(metadata, new Cram2Bam(alignmentOutput.alignments(), metadata.type()))) : alignmentOutput;
    return alignmentOutput;
}
Also used : Cram2Bam(com.hartwig.pipeline.cram2bam.Cram2Bam) AlignmentOutput(com.hartwig.pipeline.alignment.AlignmentOutput)

Example 7 with AlignmentOutput

use of com.hartwig.pipeline.alignment.AlignmentOutput in project pipeline5 by hartwigmedical.

the class PersistedAlignmentTest method returnsBamsInConventionalLocationIfNoPersisted.

@Test
public void returnsBamsInConventionalLocationIfNoPersisted() {
    PersistedAlignment victim = new PersistedAlignment(new NoopPersistedDataset(), Arguments.testDefaults());
    AlignmentOutput output = victim.run(TestInputs.referenceRunMetadata());
    assertThat(output.sample()).isEqualTo("reference");
    assertThat(output.status()).isEqualTo(PipelineStatus.PERSISTED);
    assertThat(output.alignments()).isEqualTo(GoogleStorageLocation.of("bucket", "set/reference/aligner/reference.bam"));
}
Also used : AlignmentOutput(com.hartwig.pipeline.alignment.AlignmentOutput) NoopPersistedDataset(com.hartwig.pipeline.reruns.NoopPersistedDataset) Test(org.junit.Test)

Aggregations

AlignmentOutput (com.hartwig.pipeline.alignment.AlignmentOutput)7 Test (org.junit.Test)4 NoopPersistedDataset (com.hartwig.pipeline.reruns.NoopPersistedDataset)3 ResourceFiles (com.hartwig.pipeline.resource.ResourceFiles)2 ResourceFilesFactory.buildResourceFiles (com.hartwig.pipeline.resource.ResourceFilesFactory.buildResourceFiles)2 Storage (com.google.cloud.storage.Storage)1 Lane (com.hartwig.patient.Lane)1 Sample (com.hartwig.patient.Sample)1 Arguments (com.hartwig.pipeline.Arguments)1 ResultsDirectory (com.hartwig.pipeline.ResultsDirectory)1 Aligner (com.hartwig.pipeline.alignment.Aligner)1 ImmutableAlignmentOutput (com.hartwig.pipeline.alignment.ImmutableAlignmentOutput)1 SampleSource (com.hartwig.pipeline.alignment.sample.SampleSource)1 GermlineCaller (com.hartwig.pipeline.calling.germline.GermlineCaller)1 GermlineCallerOutput (com.hartwig.pipeline.calling.germline.GermlineCallerOutput)1 CramConversion (com.hartwig.pipeline.cram.CramConversion)1 CramOutput (com.hartwig.pipeline.cram.CramOutput)1 Cram2Bam (com.hartwig.pipeline.cram2bam.Cram2Bam)1 DataType (com.hartwig.pipeline.datatypes.DataType)1 FileTypes.bai (com.hartwig.pipeline.datatypes.FileTypes.bai)1