#333 plugins not loading when included in "default tracks" param

Lincoln Stein
Gbrowse (196)

Not so much a bug fix so much as an implementation of an old feature documented for Gbrowse 1.X (http://gmod.org/wiki/GBrowse_Configuration_HOWTO#Appearance_Options) where there was an option to include plugins by default using "plugin:RestrictionAnnotator" syntax.

The inclusion of plugins in "default tracks" is not mentioned in the documentation for Gbrowse 2.0 (http://gmod.org/wiki/GBrowse_2.0_HOWTO#The_GENERAL_Section), but this was desirable for our installation.

The main issue is that plugin track definitions are without whitespace in the form, e.g. [RestrictionAnnotator], but plugins are placed in the $self->state hash keyed of the return value from $plugin->name, e.g. "Restriction Sites". So, any attempt to make these visible on Gbrowse reset or in the case of a fresh session fails.

I have coded up a possible quick fix to Bio::Graphics::Browser2::Render calls to load_plugin_annotators(). This uses the existing %default_plugin hash that is already populated with plugin module track definition names from the "default tracks" parameter, but is not further used at the present.

Drawbacks to this implementation are:
1) a slightly kludgey set of boolean tests deciding to add default plugins only when:
A) users click "reset", or
B) load_plugin_annotators() has fired off and no plugins have yet been added to $state->{tracks}, and
2) associated direct changes to the $state->{tracks} arrayRef itself.

This situation was necessary because we need plugins to exist before we can map the module base package name to $plugin->name, and init_plugins() is called after set_default_state. It was not clear where plugins are currently added to $state->{tracks} otherwise or how Bio::Graphics::Browser2::DataSource could have access to plugin->name in labels() or default_labels().

Still, this has been tested extensively with Gbrowse 2.14 and the boolean tests in load_plugin_annotators() only result in default plugin loading when Gbrowse is reset, Gbrowse is loaded with a clear querystring after removal of the gbrowse tmp directories via /cgi-bin/gbrowse/<datasource>.

Note, this current implementation retains the check that only annotator plugins can be turned on by default.


  • Anonymous

    patch file to Bio::Graphics::Browser2::Render for implementation of default annotator plugin tracks

  • Scott Cain
    Scott Cain

    • assigned_to: scottcain --> lstein
  • Lincoln Stein
    Lincoln Stein

    • status: open --> closed-fixed
  • Lincoln Stein
    Lincoln Stein

    This was fixed after a fairly extensive cleanup of the way that plugin tracks are handled. The fixed version will be in 2.15.