Skip to content

Seeing multiple primary alignments per read #44

@mwykes

Description

@mwykes

I've just use winnowmap v2.03 (installed using conda from the bioconda channel) to align reads to a haplotype resolved human assembly.

I used winnowmap --sv-off option.

As perhaps expected, each read has alignments on two contigs, the two contigs being maternal/paternal homologous pairs.

What surprised me is that both of these alignments are flagged as primary alignments in the resulting bam file. Filtering the bam file with samtools view -F 2308 does not reduce the number of alignments per read to one.

If the first half of the read was aligning to one haplotype and the second half of the read to another, I'd expect one to be primary and one supplementary.

However I'm seeing that the full length of each read is aligned in two places, so I'd expect one alignment per read to be secondary.

I can post-process the bam to update the flags such that the alignment with the higher mapping score is primary and lower is secondary, but as this might catch lots of users out, it would be great if winnowmap did this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions