[Bioperl-l] Bio::Graphics support for floating point positions
cjfields at uiuc.edu
Wed Sep 5 12:47:46 EDT 2007
On Sep 5, 2007, at 9:22 AM, Nathan Haigh wrote:
> On a similar (well, related to Bio::Graphics) topic, I've written a
> script that uses markers that have been mapped from a model
> organism to
> linkage groups in related species in order to estimate the location of
> "unknown" markers in those linkage groups.
> I'm using the Bio::Map::* modules for much of this work and then I use
> Bio::Graphics to display the linkage groups of the non-model organism
> with the putative position of the "unknown" markers. However, I've had
> to do a bit of fudging to get Bio::Graphics to draw this data. The
> problems I encountered are described below. I also have an open bug:
> 1) Linkage maps are measured in cM - which can and are likely to be
> non-integer values. Bio::Graphics needs integer values, so I simply
> scaled all my cM measurements prior to drawing by *1000. However, the
> ruler now doesn't represent the "true scale" - can this be adjusted?
> 2) Some markers map to 0cM. However, Bio::Graphics requires positions
>> 0. To get round this I simply incremented these positions by 1
> (post-scaling), so they display almost in the correct place.
> Is it possible/likely/wise to support positions starting at zero and
> float positions? Would such support simply be to internalise what I
> already done outside Bio::Graphics into the Bio::Graphics modules and
> have it display the correctly scaled ruler?
> Thoughts comments welcome.
There is this section in the GBrowse configure doc, which to me
suggests there is a way to do what you want in Bioperl; you may have
to delve into the Bio::Graphics or GBrowse code to work it out,
though. I think the GBrowse mail list archives also have more on this.
F. DISPLAYING GENETIC AND RH MAPS
GBrowse can be tweaked to make it more suitable for displaying genetic
and radiation hybrid maps.
The main issue is that the Bio::DB::GFF database expects coordinates
to be positive integers, not fractions, but genetic and RH maps use
floating point numbers. Working around this is a bit of an ugly hack.
Before loading your data you must multiply all your coordinates by a
constant power of 10 in order to convert them into integers. For
example, if a genetic map uses Morgan units ranging from 0 to 1.80,
you would multiple by 100 to create a map in ranging from 0 to 180.
Create a GFF file containing the markers in modified coordinates and
load it as usual. Now you must tell GBrowse to reverse these changes.
Enter the following options into the [GENERAL] section of the
units = M
unit_divider = 100
These two options tell GBrowse to use "M" (Morgan) units, and to
divide all coordinates by 100. GBrowse will automatically display the
scale using the most appropriate units, so the displayed map will
typically be drawn using cM units.
More information about the Bioperl-l