use of com.hartwig.pipeline.cram2bam.Cram2Bam 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;
}
Aggregations