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

Unnecessary space in BamAlignment object? #226

Open
rlorigro opened this issue Apr 22, 2022 · 0 comments
Open

Unnecessary space in BamAlignment object? #226

rlorigro opened this issue Apr 22, 2022 · 0 comments

Comments

@rlorigro
Copy link

Not sure if this is intentional or not, but there are two fields in the BamAlignment class which seem to be oversized:

uint16_t MapQuality; // mapping quality score

uint32_t AlignmentFlag; // alignment bit-flag (use provided methods to query/modify)

mapq has a maximum value of 255 so an 8bit integer would suffice, and there are only 12 boolean fields in the flag, so a 16 bit integer would be enough. You can confirm this on the SAM format spec by looking at the "Range" column in section 1.4:

https://samtools.github.io/hts-specs/SAMv1.pdf

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