[Bioperl-l] Bio::Graphics::Panel and utf-8 chars in labels

Scott Cain scott at scottcain.net
Mon Jun 7 15:42:28 UTC 2010


Hi Adam,

I don't know for sure, but I'm guessing that the reason BioGraphics
doesn't use stringFT is because it requires that libgd be compiled
with TrueType in order to work, and frequently, libgd isn't compiled
with it, and it frequently gives people a hard time getting it
compiled, and would add one more barrier to entry to people who want
to use BioGraphics and GBrowse.

Scott


On Mon, Jun 7, 2010 at 11:04 AM, Adam Sjøgren <adsj at novozymes.com> wrote:
> Does an easy way exist to use unicode/utf-8 characters in labels on
> tracks with Bio::Graphics::Panel?
>
> A script like this:
>
> = = =
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> use utf8;
>
> use Bio::Graphics::Panel;
> use Bio::SeqFeature::Generic;
> use File::Slurp;
>
> my $label='α-glucosidase';
>
> my $panel=Bio::Graphics::Panel->new(-width=>400, -length=>200);
> my $feature=Bio::SeqFeature::Generic->new(-start=>1, -end=>100, -primary_tag=>'source');
> $panel->add_track($feature, -label=>$label);
>
> write_file('panel.png', $panel->png);
> = = =
>
> Gives me a panel.png that very much looks like the label was interpreted
> as something like, say, latin1, which makes sense from a quick search in
> the GD pod - it refers to stringFT() for using unicode characters, and a
> quick ack for stringFT() in Bio/Graphics/ only shows hits in
> DrawTransmembrane.
>
> This makes me guess the answer is no, but I thought I'd ask anyway, in
> case I overlooked something.
>
>
>  Best regards,
>
>     Adam
>
> --
>                                                          Adam Sjøgren
>                                                    adsj at novozymes.com
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l



-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research




More information about the Bioperl-l mailing list