jbrowse
jbrowse copied to clipboard
Customize display of coverage depth as XYCoverage with log scale
I like the ability to add a "histograms" option for displaying bam tracks when zoomed out. However, I struggle to configure the display of said histograms in the same way as I can with a normal bigwig track. For example, consider this view:
I have tried to configure "histograms" with the same options as the blue bigwig track displayed below in the following fashion:
"histograms": {
"description": "coverage depth",
"min": 0,
"height": 100,
"color": "goldenrod",
"clip_marker_color": "red",
"binsPerBlock": 200,
"scale": "log",
"type": "JBrowse/View/Track/Wiggle/XYPlot",
"storeClass": "JBrowse/Store/SeqFeature/BigWig",
...
},
So I tried setting type
to XYPlot and scale
to log. Alas, without results. Any pointers would be appreciated.
This is indeed a limitation of coverage histograms to not have all full featured bigwig configurations but certainly it could be very nice to have all these options!
I would like to start contributing instead of just asking. @cmdcolin Could you please provide some pointers to the files / methods that would need to be adjusted for this to work?
I haven't looked into it very much but my impression is that maybe re-publish the track config as a bigwig track type. This can use the "replace" message publish/subscribe event system in JBrowse. I can dig into more details perhaps later but that is the basic idea that I would have. In this sense, the function is kind of similar between swapping SNPCoverage and Alignments2 back and forth
I'd also like to have some of the features of BigWig tracks in the histograms e.g. mouse-over displaying the coverage.
Another addition: it would be nice to be able to scale the coverage histograms like the XYPlot (e.g. "autoscale"="local") xref: https://sourceforge.net/p/gmod/mailman/message/36428645/