-
Notifications
You must be signed in to change notification settings - Fork 64
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
Create stranded SNPCoverage view #2833
Comments
could also think about multibigwig/strandedplot https://github.com/bhofmei/jbplugin-strandedplot style results but this request is more about automatically calculating from the reads themselves |
For showing the overall coverage, I expect this would involve adding an additional fwd/reverse feature filter: jbrowse-components/plugins/alignments/src/SNPCoverageRenderer/SNPCoverageRenderer.ts Lines 119 to 132 in fc60115
My guess:
[if the filtered coverage tracks can be assumed to be the same length, then these rectangles could be done within the same loop] |
Here is a reference assembly and BAM file that can be used for testing (the same one that I used in the JBrowse2 picture). This BAM file is useful because it shows stranded long reads with a very high dynamic range in coverage, so the log representation is necessary to fully appreciate the expression pattern: GRCm39.primary_assembly.chrM.fa.gz mm2_GCFeb22_S14_called_BC07_vs_chrM.bam.gz edit: updated BAM file |
Should look something like this: I needed to dig down to the SNPCoverageAdapter bin function to create additional scores for forward and reverse strand, in order to get this working. It's also a bastardisation of the scale (as you may be able to tell by looking at the Y axis). ... although it does seem to work well on log scale as well: |
great initiative diving into the codebase:)! could possibly use negative values but those will not log transform well...will probably need a real notion of having multiple signals in a single track a la multibigwig and https://github.com/bhofmei/jbplugin-strandedplot |
I've attached a diff (based on commit 85973e5). This creates a new I suppose this would be better designed as a modification of the existing patch-stranded-snp-coverage.diff.gz Note that in the highlighted column, the 'C' variants are broken by an 'A' variant in the middle on the opposite strand. This could be improved (e.g. by sorting variants based on their frequency), but I think this is at least good enough for others to understand what I'd like to achieve. |
Another |
definitely a good use case there. could possibly leverage multiwiggle display for this purpose (as they are conceptually two different signals) |
I made it so that you can now use "group by->strand" following #4178 this group by approach is a little more "round about" compared with making "displaying stranded read coverage" option in the single track, but hopefully it helps a bit maybe can close :) |
(if you are able to try it out and have any feedback, let me know) example session |
from thread here https://twitter.com/gringene_bio/status/1505780926734774275
would create separate coverage for positive and negative strand reads
The text was updated successfully, but these errors were encountered: