What is Mashome
The purpose of this library is to provide a way to inject your own HTML elements into a web-based genome browser. Mashome provides a simple interface for responding to view changes (moving and zooming along the chromosome) so that only a minimal amount of extra code is needed to create a custom track. This library should be used in cases where a typical track (BED file, WIG file, etc) is not suitable for the information you wish to plot. In general, one should be able to visually align any arbitrary plot next to a native genome browser track and use the existing genome browser's UI to navigate both the genome and one's plot.
Examples of very custom tracks
- Plot a heatmap matrix aligned with native tracks. If the columns of the heatmap correspond to coordinates along the genome, then one can easily compare values in the heatmap with other genomic elements/values being displayed in native tracks.
- Display additional text information. By registering callback functions for mouse clicks and view changes, one can make a "track" that displays extra text information (e.g. detailed information about a gene/element or links to additional resources).
- Arbitrary/flexible plotting. Using HTML5's canvas element, one can create new types of plots that cannot be represented in existing track formats (BED, WIG, etc). For example, by listening to clicks on genomics elements, one could plot a local genealogy or gene family.
How it works
- First, a bookmarklet is used to inject into a web-based genome browser (e.g. UCSC genome browser) the Mashome HTML element directly below the "native" tracks. This element will contain your own *very* custom tracks.
- Custom tracks can be additional UI elements, extra text displays, or dynamic graphical plots created by HTML5's canvas element. The data to display can be fetched by any mechanism the user chooses. For example, AJAX calls could be used to fetch data from a third-party web server or even from the localhost.
A simple example using a generic stub genome browser can be seen here.