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

Bug: Supplementary mapping flag is not set correctly #72

Closed
rob-p opened this issue Aug 17, 2024 · 1 comment
Closed

Bug: Supplementary mapping flag is not set correctly #72

rob-p opened this issue Aug 17, 2024 · 1 comment

Comments

@rob-p
Copy link

rob-p commented Aug 17, 2024

It seems that the is_supplementary flag in the Mapping structure actually records whether or not the alignment is primary not if it is supplementary. That is valid (and potentially equally optimal) alignments that are secondary (because by the SAM spec only one can be elected as primary) are instead marked as supplementary. The offending line of code seems to be:

let is_supplementary = reg.sam_pri() == 0;

The is_supplementary flag should record if the alignment is actually a supplementary alignment or not. If the mapping is “secondary” or not can already be obtained by the is_primary flag being set to false.

@rob-p rob-p changed the title Supplementary mapping flag is not set correctly Bug: Supplementary mapping flag is not set correctly Aug 17, 2024
@rob-p
Copy link
Author

rob-p commented Aug 25, 2024

This is addressed in the changes to the alignment-score branch, and supplementary mappings fully match those in minimap2 when including the query-name as is possible with the latest PR, so closing this.

@rob-p rob-p closed this as completed Aug 25, 2024
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