Skip to content

Allow bam output for parabricks path #2222

Description

@FriederikeHanssen

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions