[Bioperl-l] different label colours
Crabtree, Jonathan
crabtree at tigr.org
Thu Apr 28 11:22:52 EDT 2005
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
>
More information about the Bioperl-l
mailing list