Last active
March 3, 2021 19:06
-
-
Save flekschas/a43a1c9924b36d9f0c66862c3314689c to your computer and use it in GitHub Desktop.
Revisions
-
flekschas revised this gist
Mar 3, 2021 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # Sample-based encoding of multivecs Using `overlay` in combination with `dataTransform` and `filter` we can customize the color encoding of each row in the multivec dataset. This is more of a proof of concept rather than a recommendation. Normally you would just want to just _one_ colormap instead of different once! **Live demo**: https://gosling.js.org?gist=flekschas/a43a1c9924b36d9f0c66862c3314689c -
flekschas created this gist
Mar 3, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,84 @@ { "title": "Sample-based encoding of multivecs", "subtitle": "Use different colormap per sample", "layout": "circular", // "arrangement": "vertical", "centerRadius": 0.7, "views": [ { "tracks": [ { "data": { "url": "https://server.gosling-lang.org/api/v1/tileset_info/?d=cistrome-multivec", "type": "multivec", "row": "sample", "column": "position", "value": "peak", "categories": ["sample 1", "sample 2", "sample 3", "sample 4"], "binSize": 4 }, "overlay": [ { "mark": "rect", "dataTransform": { "filter": [ { "field": "sample", "oneOf": ["sample 1"] } ] }, "color": { "field": "peak", "type": "quantitative", "range": "viridis" } }, { "mark": "rect", "dataTransform": { "filter": [ { "field": "sample", "oneOf": ["sample 2"] } ] }, "color": { "field": "peak", "type": "quantitative", "range": "bupu" } }, { "mark": "rect", "dataTransform": { "filter": [ { "field": "sample", "oneOf": ["sample 3"] } ] }, "color": { "field": "peak", "type": "quantitative", "range": "spectral" } }, { "mark": "rect", "dataTransform": { "filter": [ { "field": "sample", "oneOf": ["sample 4"] } ] }, "color": { "field": "peak", "type": "quantitative", "range": "warm" } } ], "x": {"field": "start", "type": "genomic", "axis": "top"}, "xe": {"field": "end", "type": "genomic"}, "row": {"field": "sample", "type": "nominal" , "domain": ["sample 1", "sample 2", "sample 3", "sample 4"]}, "color": {"field": "peak", "type": "quantitative"}, "width": 600, "height": 46 } ] } ] }