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