InterMine makes use of canvasXpress heatmap to visualize gene expression data.
<canvas> tag implemented in HTML5. It is written by Isaac Neuhausi.
Hierarchical and k-Means clustering algorithms and zoom in/out functionality have been implemented within the heatmap.
The raw data is parsed and converted to InterMine objects. In a Struts controller, the expression data will be fetched by running a InterMine path query and parsed to JSON string. The JSON string will be sent to a JSP page by a http request to feed into heatmap.
FlyExpressionScoreConverter is a specific data converter for modENCODE fly expression data. The class is located at
bio/sources/modmine/fly-expression-score. Any other similar expression data conversion tasks can take the data source as a reference.
Expression data type is an extension of InterMine core model. This example can be found here and in the code block below.
Please note that it is now recommended to add the model extension to a source specific additions.xml under a source directory, rather than to a general "additions" file.
In HeatMapController, a query is run to fetch expression scores from database (ref method
queryExpressionScore), then the results are parsed to JSON string (ref method
getJSONString) and set in the request (ref method
In modMine we have two separate heatmaps, one for cell line and one for developmental stage.
heatMap.jsp displays the heatmaps. canvasXpress object takes the expression JSON string and other parameters to create the heatmaps. jQuery is used to adjust page layout.
A more up to date way of creating widget like heatmaps takes advantage of the InterMine webservices framework to query and generate JSON strings and embed the heatmap on any web page. Please check some examples of the tecnique here