Skip to content

Unnecessary space in BamAlignment object? #226

@rlorigro

Description

@rlorigro

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

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