comparison x/bedscoreplugin.js @ 133:cec274db51c0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 7d28252954cae9f8db5f8a85d8f29cb2865b504b-dirty
author fubar
date Fri, 18 Oct 2024 11:57:55 +0000
parents 49f3d3878413
children
comparison
equal deleted inserted replaced
132:1efcc387bef4 133:cec274db51c0
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 })()