Skip to content

CLI option to always include SEQ/QUAL in SAM output #507

@sjaenick

Description

@sjaenick

Hi there,

currently, strobealign (0.16.1, with -N 5) does not include SEQ/QUAL fields for non-primary alignments.

https://github.com/ksahlin/strobealign/blob/main/src/sam.cpp#L190
https://github.com/ksahlin/strobealign/blob/main/src/sam.cpp#L199

This is perfectly fine and correct with regard to the SAM spec.

However, it became a problem for me when filtering the alignments vs. a set of regions defined
via a BED file (i.e., samtools view -L genes.bed). If the primary alignment is located outside of the
defined regions, and one or several secondary alignments are within them, only the secondary
alignments are retained. As a consequence, none of the alignments for a read has SEQ/QUAL
in the filtered output file.

(I'll open a separate issue for samtools to discuss whether SEQ/QUAL should be transferred from
primary to (at least the first) secondary alignment in this situation.)

Would you consider adding a new CLI parameter to include SEQ/QUAL in secondary alignments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions