[Bioperl-l] Bio::Graphics
Wes Barris
wes.barris at csiro.au
Wed Aug 6 20:23:17 EDT 2003
Laurence Amilhat wrote:
> Hi,
>
> I try to learn how to use the module Bio::Graphics.
> I found he How To from Lincoln Stein on the web. I try to practice with
> the examples, it's working except for the labels of the features that
> don't appear on my figure.
> Does anybody ever use this module?
Hi Laurence,
I have not been able to get this function working either. I am experiencing
the exact same problem as you. I have tried this on two separate computers
where bioperl was installed by two different people. Both are Redhat systems.
One is running bioperl-1.2.1, the other is running bioperl-1.2.2. In both
cases the labels are silently omitted.
The example that I was trying is the first one on this page:
http://bioperl.org/HOWTOs/html/Graphics-HOWTO.html
It is virtually the same as your example with one small difference. You
code includes this line:
my $feature = Bio::SeqFeature::Generic->new(-display_name=>$name,-score=>$score,
The example from the URL above uses a slight variation:
my $feature = Bio::SeqFeature::Generic->new(-seq_id=>$name,-score=>$score,
I have tried both versions. Neither of them produced a label in the
resulting png file. I don't know what the significance of the two different
attributes is. I can read the words of the documentation, but it didn't
explain the difference of the two or if they were somehow related.
Obviously, there is a bug somewhere in bioperl or in the provided examples
(or in the provided installation instructions). Either that, or we have
both made the exact same error in doing something. I just don't know what.
I have posted a question about this exact same anomaly to this mailing list
but have not received any suggestions yet. Perhaps this module is not too
heavily used.
>
> This is the example:
> #!/usr/local/public/bin/perl
>
> use strict;
> use lib
> '/homej/bioinf/lamilhat/PERL_MODULE/lib/perl5/site_perl/5.005/BIOPERL/li
> b/site_perl/5.6.1/';
> use Bio::Graphics;
> use Bio::SeqFeature::Generic;
>
> my $panel= Bio::Graphics::Panel->new(-length =>1000,-width =>800);
> my $track=$panel->add_track(-glyph =>'generic',-label =>1);
>
>
> while (<>)
> {
> chomp;
> next if /^\#/;
> my ($name,$score,$start,$end)=split /\t+/;
> print STDERR "$name\n";
> my $feature=
> Bio::SeqFeature::Generic->new(-display_name=>$name,-score=>$score,-start
> =>$start,-end=>$end);
> $track->add_feature($feature);
> }
>
> print $panel->png;
>
>
> And this is the Data to parse with the example:
> #hit score start end
> truc1 381 2 200
> truc2 210 2 210
> truc3 800 2 200
> truc4 1000 380 921
> truc5 812 402 972
> truc6 1200 400 970
> bum 400 300 620
> pres1 127 310 700
>
>
> Thanks,
>
> Laurence.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> INRA, UMR INRA/UBP Amélioration et Santé des Plantes
> 234 avenue du Brézet
> 63039 Clermont-Ferrand Cedex 2
>
> Tel 04 73 62 48 37
> Fax 04 73 62 44 53
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
Wes Barris
E-Mail: Wes.Barris at csiro.au
More information about the Bioperl-l
mailing list