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

Fix for rendering of softclipping when there are insertions in the sequence #4402

Merged
merged 2 commits into from
May 29, 2024

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented May 29, 2024

Fixes #4401

The code now processes the entire CIGAR string to get the seqOffset and refOffset. This is canonical CIGAR parsing code that is pretty idiomatic. The alternative to this would be adding an extra field for seqOffset to the mismatches datastructure. possibly that could be considered later on, but it would actually increase memory consumption so it's a tradeoff

this branch, showing both BAM and CRAM softclipping on long reads that have insertions and deletions. this actually looks expected as it shows that the alignments are pretty similar nearby the clip site but then diverge as they move away from it (compared to main branch, where it is almost random)
Screenshot from 2024-05-29 14-11-09

main branch, showing both BAM and CRAM softclipping on long reads that have insertions and deletions
Screenshot from 2024-05-29 14-11-13

@cmdcolin cmdcolin changed the title Fix for rendering of softclipping when there are insertions in the stringr Fix for rendering of softclipping when there are insertions in the sequence May 29, 2024
@cmdcolin cmdcolin merged commit 9f19cb6 into main May 29, 2024
10 checks passed
@cmdcolin cmdcolin deleted the render_softclip branch May 29, 2024 20:28
@cmdcolin cmdcolin added the bug Something isn't working label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect soft clipped region after insertion (one off error?)
1 participant