[Bioperl-l] Can I get different Graphics::Panel colours
fordifferent HSP frames within the same blast hit?
Marcus Claesson
m.claesson at student.ucc.ie
Thu Dec 9 13:26:52 EST 2004
Thanks for your answers guys!
That hack seems to do it. However, my program will be used by people
installing it themselves so I have to stick with the standard non-hacked
version of bioperl.
Cheers though,
Marcus
On Thu, 2004-12-09 at 16:51, Crabtree, Jonathan wrote:
> Hi Aaron-
>
> > There's another solution that shouldn't involve code patches: see the
> > documentation in Panel (short answer: all_callbacks: 1)
>
> Perhaps I'm being obtuse, but I don't see how turning all_callbacks on
> helps you with the -bgcolor issue. It seems like
> Bio::Graphics::Glyph::graded_segments::draw need to be called on the
> parent feature in order to get the correct min/max score range. To wit:
>
> my ($min_score,$max_score) = $self->minmax(\@parts);
>
> And since the call that sets $fill = $self->bgcolor is outside the loop
> that sets the colors of the individual @parts (the HSPs in this case),
> there's no way you can then get a different (base) color for each part
> unless you do what I did, and move the assignment to $fill inside the
> loop.
>
> Now I'm not saying there isn't some other way to assign the HSPs their
> own colors, just that if you want to use the graded_segments glyph to do
> so then you need a slightly different implementation of its draw method.
> Besides, all solutions involve code patches; it's just a question of
> which code you feel like patching ;)
>
> Jonathan
More information about the Bioperl-l
mailing list