Extending Embedding and Customizing JBrowse
From GMOD
Revision as of 20:50, 7 March 2011 by MitchSkinner (Talk | contribs)
Result of discussions at GMOD satellite meeting, March 2011
Potential upcoming changes to JSON format:
http://biowiki.org/view/JBrowse/JsonFormatStabilization
TODO/wishlist for JBrowse:
- namespace CSS
- putting track list into separate DOM element (e.g., Drupal "block")
- "Browser" API: anything you can do manually
- Hooks:
- featureCreate: has access to: feature data, feature HTML element, can:
- style the element, and
- add callbacks to the element
- featureEventHooks:
- featureCreate: has access to: feature data, feature HTML element, can:
{ click: function(feature array, HTML element, getAttr, event) mouseover: function(... mouseout: ... [DOM event name]: [callback function] }
current approach:
fields: { "start": 1, "end": 2, "strand": 3, ... }
changing to: getAttr
- access to region selections (e.g., for creation of lists of features)
- function that: takes currently visible sequence, PSSM or set of regexes, returns: set of regions
"Browser" API extensions:
Browser.iterateFeaturesInTrack("gene", function(feature, elem, getAttr) {if (getAttr(feature, "id") == "foo") {elem.style.backgroundColor="red"}})
?Browser.filterTrackBy("gene", function(feature, elem, getAttr { return (getAttr(feature, "id") == "foo") });
e.g.,
- all genes in a given pathway with expression > 2 s.d. above average
- all genes tagged with a given GO term