[Bioperl-l] Getting Co-ordinates in Bio::Graphics::Panel

Crabtree, Jonathan crabtree at tigr.org
Wed May 5 14:50:03 EDT 2004


Adam, Lincoln-

> Use $panel->boxes().  It returns the glyphs in all tracks. Since 
> boxes() returns the feature object, you can simply ignore the ones 
> you don't want.
>
> $track->boxes() should work too.  I don't know why it isn't.
> 

&Glyph::boxes relies on the Panel to supply its vertical position, so I
think that in Adam's example a direct call to $track->boxes() would
probably return all the bounding boxes, but incorrectly offset by 10
pixels (the value of the panel's pad_top, since the track appears at the
top of the Panel.)  Because of this, &Glyph::boxes shouldn't be called
directly (unless, of course, you know what you're doing, but isn't that
always the case in Perl...)

Jonathan



More information about the Bioperl-l mailing list