Mercurial > repos > fubar > jbrowse2
comparison x/bedscoreplugin.js @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
124:137e08517410 | 125:49f3d3878413 |
---|---|
1 // colour bed regions according to score - must have columns and score as part of the adapter setup | |
2 ;(function () { | |
3 class Plugin { | |
4 name = 'BedScorePlugin'; | |
5 version = '1.0'; | |
6 | |
7 install(pluginManager) { | |
8 pluginManager.jexl.addFunction('customColor', feature => { | |
9 if (Number(feature.get('score')) > 0) { | |
10 return 'red'; | |
11 } else { | |
12 return 'blue'; | |
13 } | |
14 }) | |
15 } | |
16 | |
17 configure(pluginManager) {} | |
18 } | |
19 | |
20 // the plugin will be included in both the main thread and web worker, so | |
21 // install plugin to either window or self (webworker global scope) | |
22 ;(typeof self !== 'undefined' ? self : window).JBrowsePluginBedScorePlugin = | |
23 { | |
24 default: Plugin, | |
25 } | |
26 })() |