-
Notifications
You must be signed in to change notification settings - Fork 63
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 better inversion visualization to read vs reference visualizations #2198
Conversation
better inversion visualization
Codecov Report
@@ Coverage Diff @@
## main #2198 +/- ##
==========================================
- Coverage 62.71% 62.54% -0.17%
==========================================
Files 484 484
Lines 22641 22702 +61
Branches 5141 5151 +10
==========================================
Hits 14200 14200
- Misses 8171 8232 +61
Partials 270 270
Continue to review full report at Codecov.
|
Actually the overhang went away with 79c662f which is more expected...the breakpoint of the inversion is quite sharp so no overhang is expected. The coding issue is that the clipping needs to be read from the end of the cigar string instead of the front in this case, and the getClip function actually had that designed in... Screenshot looks cleaner now |
a4dd0df
to
9a25fb0
Compare
In the past PR #2024 the strand got ignored in read vs ref because after drawing negative strand alignments was added to the renderer, it was realized that strand was not specified correctly at that time of loading the data for read vs ref visualizations
This change makes the read vs reference strand become relative to the "original strand" the feature was on.
Intuitively if a read is on the forward strand, switches to the reverse, and back to forward
And the left most is the "primary" alignment (the rest are supplementary/split read alignments) then the strands are 1 for primary, -1 and then 1 for supp
But also the data can come in like
This is fundamentally equivalent but the data is just from a reverse strand template. Therefore we flip the read orientation relative to the original strand when we plot it
Example showing inversion
In this case the supplementary alignments do not store their cigar strings in the SA tag, so they are not plotted, but the data should otherwise be accurate. The overhand of the inverted polygon with the left side is also I believe expected. We can look at the SA tag and see that it says 5002 bases soft clipped for the inverted part, and this directly corresponds to it starting at position 5002 on the bottom panel (since the bottom panel is the literal sequence, it is just starting at position 5002 because thats how many bases are clipped off)