[Bioperl-l] different label colours

Crabtree, Jonathan crabtree at tigr.org
Fri Apr 29 09:50:22 EDT 2005


Hota-

That's interesting.  I suspect that the problem is actually not in your
-fontcolor subroutine, but somewhere else in your script.  Can you show
us the rest of the code?  Either your labeled features aren't getting
assigned a primary_tag correctly, or perhaps the primary_tag value is
being erased somehow.  For example, maybe one of your other subroutines
is accidentally invoking primary_tag as a setter, not a getter, as in
$feature->primary_tag('') or $feature->primary_tag(undef)

Jonathan

> -----Original Message-----
> From: Horvath Tamas [mailto:hota.fin at freemail.hu] 
> Sent: Friday, April 29, 2005 10:33 AM
> To: Crabtree, Jonathan
> Cc: Bioperl
> Subject: Re: [Bioperl-l] different label colours
> 
> 
> Crabtree, Jonathan wrote:
> 
> >Hi Hota-
> >
> >This should work.  Why don't you try inserting the following line in 
> >your anonymous sub (after "my $feature = shift;") and then 
> tell us what 
> >(if anything) shows up on STDERR when you run your script:
> >
> >print STDERR "tag='", $feature->primary_tag, "'\n";
> >
> >Jonathan
> >
> >  
> >
> >>-----Original Message-----
> >>From: bioperl-l-bounces at portal.open-bio.org
> >>[mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of 
> >>Horvath Tamas
> >>Sent: Thursday, April 28, 2005 8:25 AM
> >>To: Bioperl
> >>Subject: [Bioperl-l] different label colours
> >>
> >>
> >>I'm trying to use different label colours in one single
> >>track, but the  
> >>'sub {}' does not work for the '-fontcolor' option. Is there 
> >>a solution? 
> >>If not yet, where should I look over the code, to implement it?
> >>
> >>Hota
> >>
> >>PS.:
> >>
> >>-fontcolor => sub { my $feature = shift;
> >>                                         return 'red' if
> >>$feature->primary_tag =~ /mudr/i;
> >>                                         return 'blue' if 
> >>$feature->primary_tag =~ /zn_finger/i;
> >>                                         return 'orange' if 
> >>$feature->primary_tag =~ /repeat/i;
> >>                                         return 'green' if 
> >>$feature->primary_tag eq 'exon';
> >>                                    },
> >>this is how it looks like, but the label color is 
> consistently black 
> >>(though if I explicitly use -fontcolor => 'green' then the label is 
> >>green indeed)
> >>_______________________________________________
> >>Bioperl-l mailing list
> >>Bioperl-l at portal.open-bio.org 
> >>http://portal.open-> bio.org/mailman/listinfo/bioperl-l
> >>
> >>    
> >>
> >
> >_______________________________________________
> >Bioperl-l mailing list
> >Bioperl-l at portal.open-bio.org 
> >http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
> >
> >  
> >
> Sorry, it's pretty messed up, but anyway, it looks like: (at 
> font color, 
> it is always '')
> 
> tag_at_glyph='mudr_exon'
> tag_at_glyph='mudr_exon'
> tag_at_glyph=''
> tag_at_glyph='zn_finger_exon' 
> tag_at_glyph='zn_finger_exon'tag_at_connector='
> '
> tag_at_connector=''
> tag_at_connector='repeat_L'
> tag_at_strand_arrow='repeat_L'
> tag_at_bgcolor='repeat_L'
> tag_at_connector='repeat_R'
> tag_at_strand_arrow='repeat_R'
> tag_at_bgcolor='repeat_R'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='last_exon'
> tag_at_strand_arrow='last_exon'
> tag_at_bgcolor='last_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon' 
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='repeat_L'
> tag_at_strand_arrow='repeat_L'
> tag_at_bgcolor='repeat_L'
> tag_at_connector='repeat_R'
> tag_at_strand_arrow='repeat_R'
> tag_at_bgcolor='repeat_R'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='last_exon'
> tag_at_strand_arrow='last_exon'
> tag_at_bgcolor='last_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon' 
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='repeat_L'
> tag_at_strand_arrow='repeat_L'
> tag_at_bgcolor='repeat_L'
> tag_at_connector='repeat_R'
> tag_at_strand_arrow='repeat_R'
> tag_at_bgcolor='repeat_R'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='last_exon'
> tag_at_strand_arrow='last_exon'
> tag_at_bgcolor='last_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon' 
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='repeat_L'
> tag_at_strand_arrow='repeat_L'
> tag_at_bgcolor='repeat_L'
> tag_at_connector='repeat_R'
> tag_at_strand_arrow='repeat_R'
> tag_at_bgcolor='repeat_R'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='last_exon'
> tag_at_strand_arrow='last_exon'
> tag_at_bgcolor='last_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon' 
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='repeat_L'
> tag_at_strand_arrow='repeat_L'
> tag_at_bgcolor='repeat_L'
> tag_at_connector='repeat_R'
> tag_at_strand_arrow='repeat_R'
> tag_at_bgcolor='repeat_R'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='last_exon'
> tag_at_strand_arrow='last_exon'
> tag_at_bgcolor='last_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon' 
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='repeat_L'
> tag_at_strand_arrow='repeat_L'
> tag_at_bgcolor='repeat_L'
> tag_at_connector='repeat_R'
> tag_at_strand_arrow='repeat_R'
> tag_at_bgcolor='repeat_R'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector=''
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='exon'
> tag_at_strand_arrow='exon'
> tag_at_bgcolor='exon'
> tag_at_connector='last_exon'
> tag_at_strand_arrow='last_exon'
> tag_at_bgcolor='last_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_connector='mudr_exon'
> tag_at_strand_arrow='mudr_exon'
> tag_at_bgcolor='mudr_exon'
> tag_at_fontcolor=''
> tag_at_connector=''
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon' 
> tag_at_connector='zn_finger_exon' tag_at_strand_arrow='zn_finger_exon'
> tag_at_bgcolor='zn_finger_exon'
> tag_at_fontcolor=''
> 
> 



More information about the Bioperl-l mailing list