The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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 (Depricated)

Since this script is now using PhyloGeoViz for the GMap interactions, we no longer need the api key. I'm keeping this section of comments in case we ever need it again.

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.

Current Data Requirements

  • Different Populations will have different track types.

  • Latitude and Longitude

    A track is identified as being a population if it has latitude and longitude values assigned in the configuration file.

  • Haplotypes

    Each haplotype of a population is stored as a feature with the "score" value deterimining its weight. The feature "name" is the haplotype name. For features to be considered as part of the same population group, they must all share the same start and end.

  • Start and end of all used features the same.

    Only features that have the same start and end as the chosen feature will be displayed. If a feature has a different start or end, it will be excluded.

  • SeqFeature::Store is being used.

    I'm pretty sure that this won't work for anything other than SeqFeature::Store. I haven't tested that assumption though. There should be a way to generalize this. The feature searching is where I'm conserned about it.

TODO

This is currently a work in progress.

  • Pie Size

    Need to add some sort of configuration to pass the pie sizes in kilometers because it is completely skewed right now.

  • PhyloGeoViz location

    Add a config option for the where the PhyloGeoViz newviewer.php file is located.

  • Demo Data

    Need to create a dummy dataset and config file that can be shared as a demo.

  • Doesn't load correctly in balloon

    Currently the local phylogeoviz doesn't correctly load in the balloon.

  • Other Interesting Features