[Bioperl-l] Bio::Graphics::Glyph->parts differences between 1.636 and 1.654

Oliver Burren oliver.burren at cimr.cam.ac.uk
Tue Sep 19 08:34:36 UTC 2006


Thanks Lincoln. I overrode maxdepth and set it to 1. I assume that this
is more efficient than setting to undef ?

perl test_parts.pl
Top level feature contains 100 features
Bio::Graphics::Panel API is 1.654 <----
Bio::Graphics::Glyph::testparts.pm can find 100 parts.

So problem solved. I am intrigued though as you said there were two
things, I was just wondering about the second thing ?

Thanks for your help.

Olly Burren




On Fri, 2006-09-15 at 18:28 -0400, Lincoln Stein wrote:
> Hi Oliver,
> 
> Sorry the answer didn't occur to me earlier. There is a new maxdepth method
> that returns the number of levels of descent that the glyph can draw.
> Bio::Graphics::Glyph returns undef from this method, meaning that it can
> draw an unlimited number of levels of subparts, but
> Bio::Graphics::Glyph::generic returns 0, meaning that it only cares about
> the top level feature. This is a major performance boost.
> 
> For your glyph, you can do one of two things:
> 
>  1) override maxdepth() so that it returns the number of levels to descend
> into.
> 
> 
> On 9/15/06, Lincoln Stein <lincoln.stein at gmail.com> wrote:
> >
> > I will test this. The parts() API is not supposed to have changed. If you
> > could send me your script, that would be very helpful.
> >
> > Best,
> >
> > Lincoln
> >
> >
> > On 9/15/06, Oliver Burren <oliver.burren at cimr.cam.ac.uk> wrote:
> > >
> > > Hi Bioperlers,
> > >
> > > I'm having some problems with the CVS version of Bio::Graphics::Glyph
> > > especially the 'parts' method. I have written a script and module to
> > > demonstrate behaviour which I am happy to supply on request.
> > >
> > > Script is called test_parts.pl. It creates a 100 random features and
> > > adds them to a holding feature. A Bio::Graphics::Panel is created that
> > > this is then passed to for rendering. The glyph used to render is
> > > test_parts with following 'draw' sub
> > >
> > > sub draw{
> > >   my $self=shift;
> > >   warn "Bio::Graphics::Panel API is ".Bio::Graphics::Panel::api_version
> > > ()."\n";
> > >   warn "Bio::Graphics::Glyph:: testparts.pm can find ".(($self->parts
> > > =~ /ARRAY/?@{$self->parts}:$self->parts)|'no')." parts\n";
> > > }
> > >
> > >
> > > #With 'old' version of Bio::Graphics.
> > >
> > > perl test_parts.pl
> > > Top level feature contains 100 features
> > > Bio::Graphics::Panel API is 1.636
> > > Bio::Graphics::Glyph::testparts.pm can find 100 parts
> > >
> > > #with 'new' (CVS co) version.
> > >
> > > perl test_parts.pl
> > > Top level feature contains 100 features
> > > Bio::Graphics::Panel API is 1.654
> > > Bio::Graphics::Glyph::testparts.pm can find 0 parts
> > >
> > > Looks as if I'm loosing parts between the two apis ?
> > >
> > > I saw a thread on gmod mailing list
> > >
> > > http://sourceforge.net/mailarchive/forum.php?
> > > forum_id=31947&max_rows=25&style=flat&viewmonth=200607&viewday=26 which
> > > may be relevant but I wasn't able to find any follow up.
> > >
> > > Would somone be able to advise/document the changes that have occured
> > > between the 2 api versions that might be relevant so that I can patch
> > > some of my custom glyphs so they are compatible.
> > >
> > > Many thanks,
> > >
> > >
> > > Olly Burren
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l at lists.open-bio.org
> > > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> > >
> >
> >
> >
> > --
> > Lincoln D. Stein
> > Cold Spring Harbor Laboratory
> > 1 Bungtown Road
> > Cold Spring Harbor, NY 11724
> > (516) 367-8380 (voice)
> > (516) 367-8389 (fax)
> > FOR URGENT MESSAGES & SCHEDULING,
> > PLEASE CONTACT MY ASSISTANT,
> > SANDRA MICHELSEN, AT michelse at cshl.edu
> >
> 
> 
> 




More information about the Bioperl-l mailing list