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

BamRecord's PositionEnd() inconsistent with Position() #49

Open
Ahhgust opened this issue Jun 13, 2019 · 0 comments
Open

BamRecord's PositionEnd() inconsistent with Position() #49

Ahhgust opened this issue Jun 13, 2019 · 0 comments

Comments

@Ahhgust
Copy link

Ahhgust commented Jun 13, 2019

Position() gives the 0-based position of the start of the read (that is, it's the start position in the genome). PositionEnd() is not the (1-based) stop position in the genome as I think most people would expect. It's computed as:

b->core.pos + GetCigar().NumQueryConsumed()

Which mixes the read-coordinate system (number of query bases consumed) with the genome coordinate system (core.pos).

I would suggest:

b->core.pos + GetCigar().NumReferenceConsumed()

instead, which gives the stop position in the genome of the read.

-August

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