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

Lincoln Stein lstein at cshl.edu
Wed May 5 15:01:00 EDT 2004

Quite right.  The track knows nothing about its vertical position.  It 
also doesn't know about the pad_left either.


On Wednesday 05 May 2004 02:50 pm, Crabtree, Jonathan wrote:
> 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

Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724

More information about the Bioperl-l mailing list