{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "config": { "axis": {"grid": true, "tickBand": "extent"} }, "datasets": { "variants": [], "haplotype_variants": [], "haplotype_fractions": [], "covered_variants": [], "allele_frequency_distribution": [] }, "vconcat":[ { "layer": [ { "data": {"name": "haplotype_variants"}, "transform": [ { "lookup": "haplotype", "from": { "data": {"name": "haplotype_fractions"}, "key": "haplotype", "fields": ["fraction"] } } ], "mark": {"type": "bar", "tooltip": true}, "encoding": { "x": {"field": "variant", "type": "ordinal", "axis": {"title": null, "labelFontSize": 12}}, "y": {"aggregate": "sum", "type": "quantitative", "field": "fraction", "axis": {"titleFontSize": 16}}, "color": { "field": "haplotype", "type": "nominal", "legend": {"titleFontSize": 16, "labelFontSize": 14}, "scale": {"scheme": "category20"} } } }, { "data": {"name": "variants"}, "mark": {"type": "point", "tooltip": true}, "encoding": { "x": {"field": "variant", "type": "ordinal", "axis": {"labels": true, "title": null, "labelFontSize": 12}}, "y": { "field": "vaf", "type": "quantitative", "axis": {"titleFontSize": 16, "labelFontSize": 12}, "scale": {"domain": [0, 1]} }, "color": {"value": "black"} } } ] }, { "data": {"name": "haplotype_variants"}, "mark": {"type":"rect", "tooltip": true}, "encoding": { "y": {"field": "haplotype", "type": "ordinal", "axis": {"titleFontSize": 16, "labelFontSize": 12}}, "x": {"field": "variant", "type": "ordinal", "axis": {"titleFontSize": 16, "labels": true, "labelFontSize": 12}}, "color": { "field": "haplotype", "scale": {"scheme": "category20"}, "legend": null } } }, { "data": {"name": "covered_variants"}, "mark": {"type": "rect", "tooltip": true}, "encoding": { "y": {"field": "haplotype", "type": "ordinal", "axis": {"titleFontSize": 16, "labelFontSize": 12}}, "x": {"field": "variant", "type": "ordinal", "axis": {"titleFontSize": 16, "labels": true, "labelFontSize": 12}}, "color": { "field": "haplotype", "scale": {"scheme": "category20"}, "legend": null } } }, { "data": {"name": "allele_frequency_distribution"}, "mark": {"type": "circle", "tooltip": true}, "encoding": { "x": { "field": "variant", "type": "ordinal", "title": "Variant", "axis": {"labelFontSize": 12, "titleFontSize": 16} }, "y": { "field": "allele_freq", "type": "quantitative", "title": "Allele frequency", "axis": {"labelFontSize": 12, "titleFontSize": 16} }, "color": { "field": "probability", "type": "quantitative", "legend": { "title": null } }, "size": { "field": "probability", "type": "quantitative", "legend": { "title": null } } } } ] }