Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeing multiple primary alignments per read #44

Open
mwykes opened this issue Feb 21, 2024 · 0 comments
Open

Seeing multiple primary alignments per read #44

mwykes opened this issue Feb 21, 2024 · 0 comments

Comments

@mwykes
Copy link

mwykes commented Feb 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant