GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
463 stars 199 forks source link

Add options to Feature Track Pulldown Menu #815

Closed wkpalan closed 7 years ago

wkpalan commented 8 years ago

I was wondering if there was any way to add a button to specific type of feature tracks from a plugin.

I have been able to add a global menu item, but it would be more useful if it was based on a feature track menu than a global menu.

enuggetry commented 8 years ago

CanvasFeatures.js is the only example I can think of that extends the per track menu. https://github.com/GMOD/jbrowse/blob/40aab138058772dd7e061bebd1aa14c48221868b/src/JBrowse/View/Track/CanvasFeatures.js#L967

I'm pretty sure others have built some plugins to do this, though.

On Wed, Oct 5, 2016 at 3:22 PM, Gokul Wimalanathan <notifications@github.com

wrote:

I was wondering if there was any way to add a button to specific type of feature tracks from a plugin.

I have been able to add a global menu item, but it would be more useful if it was based on a feature track menu than a global menu.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GMOD/jbrowse/issues/815, or mute the thread https://github.com/notifications/unsubscribe-auth/AJlnAUBbLv6zErRTA8n_KWbMnlpGw7Xmks5qxCMPgaJpZM4KPWkA .

cmdcolin commented 7 years ago

Yep this is pretty common to do in plugins. You can override the _trackMenuOptions function in a subclass.

If you need an intro to the plugin I made a tutorial for how to add a menu item like this here http://searchvoidstar.tumblr.com/post/153010503488/creating-a-jbrowse-plugin

cmdcolin commented 7 years ago

Maybe close for now! Feel free to add comments if interested, but closing since it's not necessarily a jbrowse bug or feature request