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

Calculates the ref length of mate read using "MC:Z" when available #67

Merged
merged 8 commits into from
Feb 5, 2024

Conversation

milkschen
Copy link
Owner

@milkschen milkschen commented Feb 5, 2024

Previously, we inferred the mate reference length using the query length of a read. This can result in inconsistent lift-over results between a pair of reads. For example, if the soft clipped region of a paired-end read overlaps with a chain gap, leviosam2 used to ignore the gap for the main segment but assign the mate to be unliftable.

The MC:Z tag describes the CIGAR of the mate read in the paired-end mode. This PR uses the tag (when available) to calculate the mate starting and ending positions (wrt the reference) to increase the consistency of paired-end lift-over.

This feature is not compatible with htslib v1.11, which is pretty old. I also terminate the support of that version in this PR.

@milkschen milkschen merged commit 9aa8321 into main Feb 5, 2024
23 checks passed
@milkschen milkschen deleted the mate_read branch February 5, 2024 08:01
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.

1 participant