[Gmod-help] GBrowse2: imagemaps and scales on xyplot tracks
Jonathan Arvisais
Jonathan.Arvisais at dnalandmarks.ca
Fri Mar 5 12:32:01 EST 2010
Hi,
We have features displayed on a xyplot track. When two features have the
same position, it's impossible for users to see the details (link and
balloon hover) of one of those features because their link/hover
rectangles on the imagemap entirely overlap each other.
For example, these two features:
chr lineA association 4719228 4719228 1.716993287 . .
Name=Male_feature_123;ID=10987;Ptype=0.05;Datatype=Male;P_value=0.020
chr lineA association 4719228 4719228 2.716472047 . .
Name=Female_feature_123;ID=65432;Ptype=0.01;Datatype=Female;P_value=0.003
This is how the features are displayed on our track
(gbrowse2_1-features.gif):
This is the rectangle on the imagemap that shows the balloon on mouse
hover and that links to both features' link (it's actually 2 pixels wide,
but I drew it 3 pixels wide for better visibility). It covers the whole
height of the track, but only 2 pixels wide even though the glyph's radius
is 5 pixels (gbrowse2_2-actual-imagemap.gif):
I think it would be better if the imagemap's rectangles actually fit the
glyphs' height and width like this (gbrowse2_3-right-imagemap-female.gif
and gbrowse2_4-right-imagemap-male.gif):
Also, the scales are repeated for each feature, which can mess up the
display of a track (gbrowse2_5-actual-scale-repeated.gif):
Could it be possible to have scale settings like leftmargin, rightmargin,
bothmargin in addition to none, left, right, and both?
(gbrowse2_6-actual-scale-repeated.gif and
gbrowse2_7-scale-leftmargin.gif):
For example, I did a quick fix by adding #JA lines in
Bio::Graphics::Glyph::xyplot::_draw_scale() and it does show only one
scale in the left margin:
my $x0 = 20; #JA (should get some value from GBrowse's margin settings)
...
$gd->line($x0,$y1,$x0,$y2,$fg) if $side eq 'leftmargin'; #JA
...
for (sort {$a->[0]<=>$b->[0]} @points) {
...
$gd->line($x0-3,$_->[0],$x0,$_->[0],$fg) if $side eq 'leftmargin'; #JA
...
if ($side eq 'leftmargin') { #JA
$gd->string($font, #JA
$x0 - $font->width * length($_->[1]) - 3,$font_pos, #JA
$_->[1], #JA
$fg); #JA
}
...
}
Thanks!
_______
Jonathan Arvisais
Programmeur Informatique
T: (450) 358-2621 x224
DNA Landmarks Inc.
84 Richelieu
St.-Jean-sur-Richelieu, J3B 6X3
Québec, Canada
arvisaisj at dnalandmarks.ca
www.dnalandmarks.ca
DNA LandMarks
une compagnie de BASF Plant Science
a BASF Plant Science company
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2457 bytes
Desc: not available
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2537 bytes
Desc: not available
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2483 bytes
Desc: not available
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2482 bytes
Desc: not available
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment-0003.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 3549 bytes
Desc: not available
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment-0004.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1284 bytes
Desc: not available
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment-0005.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1157 bytes
Desc: not available
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20100305/97130a2b/attachment-0006.gif>
More information about the Gmod-help
mailing list