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

Add "endpos" filter expression #1307

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Conversation

jmarshall
Copy link
Member

@jmarshall jmarshall commented Jul 7, 2021

For your amusement at this time, here is a PR that implements endpos as a filter expression, in response to https://twitter.com/gringene_bio/status/1412686733225857024.

See also the companion documentation PR samtools/samtools#1464.

"endpos" is the (1-based inclusive) position of the rightmost mapped base of the read, as measured using the CIGAR string. (bam_endpos() returns 0-based exclusive, which is the same thing.) For unmapped reads, it is the same as "pos".

@jkbonfield
Copy link
Contributor

I think the ongoing discussion around endpos vs posend is a good one too. I'm ambivalent really.

Anyway it's not something we should spend time on for this release, but I'm fully up for adding this feature. A bit of a no-brainer really. Thanks.

"endpos" is the (1-based inclusive) position of the rightmost mapped base
of the read, as measured using the CIGAR string. (bam_endpos() returns
0-based exclusive, which is the same thing.) For unmapped reads, it is
the same as "pos".
@jkbonfield jkbonfield merged commit d8dbdeb into samtools:develop Jul 14, 2021
@jmarshall jmarshall deleted the endpos-expr branch July 14, 2021 13:28
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

Successfully merging this pull request may close these issues.

2 participants