GBrowse/GMap Mashup
The purpose of this code is to create a mash up of GBrowse data and Google Maps that displays diversity data of a feature in the locations that they were sampled.
Code
This code was started as a modification of the gbrowse_details script.
Template Toolkit is used to generate the html for the page. The template is encased after the __DATA__ token.
Usage
GMap API Key
To use this, a GMap API key must be supplied in the GBrowse configuration file. As of writing, keys are freely available from Google at http://code.google.com/apis/maps/.
The configuration option name is "gmap_api_key" and is specified like the following:
gmap_api_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Balloon Configuration
To place the mashup in a balloon, simply add something like the following to the track configuration.
balloon click = http://localhost/cgi-bin/gbrowse_gmap/yeast_chr1?ref=$ref;start=$start;end=$end;name=$name;class=$class;db_id=general
The "yeast_chr1" portion should be replaced with the coorect data source.
Also, "localhost" should be changed to your url. A relative url may not work because Google ties the api key to a URL.
TODO
This is currently a work in progress.
Import longitude and latitude data
Use longitude and latitude to place pins
Modify the pins to be graphical representations of the population at that point.
Determine appropriate size, zoom level and center of the map on load.