[Bioperl-l] different label colours

Crabtree, Jonathan crabtree at tigr.org
Fri Apr 29 11:02:01 EDT 2005


>There are some "interesting" things though. e.g. then is shouldn't know
>which is my 'last_exon' feature in the -strand_arrow option. If I 
>understand you correctly, basically none of the colorings and other 
>stuff should work, since none of my parent features has valid -primary 
>tag... but actually everything else works fine... except the connector,

>but that's another story...

Sorry, I should have been more specific.  The fact that fontcolor
doesn't get called on the child features has to do with the fact that
you're using the 'segments' glyph for all of your parent features.
Here's what the documentation in Bio::Graphics::Panel has to say on the

When you install a callback for a feature that contains subparts, the
callback will be invoked first for the top-level feature, and then for
each of its subparts (recursively).  You should make sure to examine the
feature's type to determine whether the option is appropriate.

Some glyphs deliberately disable this recursive feature.  The "track",
"group", "transcript", "transcript2" and "segments" glyphs selectively
disable the -bump, -label and -description options.  This is to avoid,
for example, a label being attached to each exon in a transcript, or the
various segments of a gapped alignment bumping each other.  You can
override this behavior and force your callback to be invoked by
providing add_track() with a true B<-all_callbacks> argument.  In this
case, you must be prepared to handle configuring options for the "group"
and "track" glyphs.


More information about the Bioperl-l mailing list