Mercurial > repos > fubar > jbrowse2
view bedscoreplugin.js @ 134:ed3a21033188 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit bb6736899ac3029f73455637a04a006fcd857fc2
author | bgruening |
---|---|
date | Sun, 20 Oct 2024 07:11:16 +0000 |
parents | 5d1259b88c27 |
children |
line wrap: on
line source
// colour bed regions according to score - must have columns and score as part of the adapter setup ;(function () { class Plugin { name = 'BedScorePlugin'; version = '1.0'; install(pluginManager) { pluginManager.jexl.addFunction('customColor', feature => { if (Number(feature.get('score')) > 0) { return 'red'; } else { return 'blue'; } }) } configure(pluginManager) {} } // the plugin will be included in both the main thread and web worker, so // install plugin to either window or self (webworker global scope) ;(typeof self !== 'undefined' ? self : window).JBrowsePluginBedScorePlugin = { default: Plugin, } })()