Severity: medium (efficiency, not correctness) — The new bam emit is dead in this pipeline: val_output_fmt is hard-coded to "cram" from workflows/sarek/main.nf, so --out-bam ${prefix}.cram always writes CRAM. When params.save_output_as_bam is true, subworkflows/local/fastq_preprocess_parabricks/main.nf:90 then runs samtools/convert to turn the CRAM back into BAM — a CRAM→BAM round-trip on top of pbrun's internal BAM→CRAM step. Functional, just wasteful. Consider plumbing val_output_fmt from params.save_output_as_bam so pbrun emits the requested format directly:
// in workflows/sarek/main.nf where val_output_fmt is set
val_output_fmt = channel.value(params.save_output_as_bam ? "bam" : "cram")
Then the CRAM_TO_BAM step in the subworkflow can go away.
Originally posted by @pinin4fjords in #2168 (comment)
Severity: medium (efficiency, not correctness) — The new
bamemit is dead in this pipeline:val_output_fmtis hard-coded to"cram"fromworkflows/sarek/main.nf, so--out-bam ${prefix}.cramalways writes CRAM. Whenparams.save_output_as_bamis true,subworkflows/local/fastq_preprocess_parabricks/main.nf:90then runssamtools/convertto turn the CRAM back into BAM — a CRAM→BAM round-trip on top of pbrun's internal BAM→CRAM step. Functional, just wasteful. Consider plumbingval_output_fmtfromparams.save_output_as_bamso pbrun emits the requested format directly:Then the
CRAM_TO_BAMstep in the subworkflow can go away.Originally posted by @pinin4fjords in #2168 (comment)