gosling.js
gosling.js copied to clipboard
Share y-scale and show only one axis in overlaid tracks

This happens when multiple tracks w/ different data are overlaid. This is not handled properly. Currently, only the tracks with the same data share the y axis.
Spec with an issue:
{
"title": "HBM395.NRTL.659 Bulk ATAC-seq Data Raw",
"subtitle": "Narrow Peaks and Summits",
"views": [
{
"layout": "linear",
"width": 800,
"height": 180,
"alignment": "overlay",
"tracks": [
{
"data": {
"url": "https://gist.githubusercontent.com/ngehlenborg/9af4c34c65c9b820edda366a7af8d04d/raw/f8017ea25d9a735bb998e438763f2f993df5bde8/NA_peaks.narrowPeak",
"type": "csv",
"separator": "\t",
"headerNames": ["chr", "start", "end", "name", "score", "strand", "signalValue", "pValue", "qValue", "peak" ],
"chromosomeField": "chr",
"genomicFields": ["start", "end"]
},
"mark": "bar",
"x": {"field": "start", "type": "genomic"},
"xe": {"field": "end", "type": "genomic"},
"color":{ "value": "darkblue"},
"stroke":{ "value": "darkblue"},
"strokeWidth": {"value": 0.5},
"y": {"field": "score", "type": "quantitative"}
},
{
"data": {
"url": "https://gist.githubusercontent.com/ngehlenborg/9af4c34c65c9b820edda366a7af8d04d/raw/f8017ea25d9a735bb998e438763f2f993df5bde8/NA_summits.bed",
"type": "csv",
"separator": "\t",
"headerNames": ["chr", "start", "end", "name", "score"],
"chromosomeField": "chr",
"genomicFields": ["start", "end"]
},
"mark": "bar",
"x": {"field": "start", "type": "genomic"},
"xe": {"field": "end", "type": "genomic"},
"stroke":{ "value": "lightblue"},
"color":{ "value": "lightblue"},
"strokeWidth": {"value": 1},
"y": {"field": "score", "type": "quantitative"}
}
]
}
]
}