comparison bedscoreplugin.js @ 108:5d1259b88c27 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 9de1453a009c254ab11b16ae8a56cb5c22b131bf
author fubar
date Sat, 29 Jun 2024 06:10:22 +0000
parents
children
comparison
equal deleted inserted replaced
107:a074cd6b5905 108:5d1259b88c27
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 })()