[Bioperl-l] Bio::Graphics

Laurence Amilhat Laurence.Amilhat at clermont.inra.fr
Wed Aug 6 03:09:56 EDT 2003



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?

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/lib/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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Bioperl-l mailing list