[Bioperl-l] Re: Bioperl-l Digest, Vol 4, Issue 3
Scott Cain
cain at cshl.org
Wed Aug 6 15:52:28 EDT 2003
Laurence,
I ran a script very similar to what you are using (the code I used is
below), and I didn't have any problems, at least not if what is expected
is the same as this: http://www.gmod.org/BioGraphicsTest.png.
I suspect you are having a version problem. I am using bioperl-live
(from CVS), but when I installed bioperl-1.2.2, it failed in the way you
describe. Where is the tutorial you are reading? Perhaps it is not in
sync with the most recent version of released bioperl.
Here is the script I used:
#!/usr/local/bin/perl -w
use strict;
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 (<DATA>)
{
chomp;
next if /^\#/;
my ($name,$score,$start,$end)=split /\s+/;
warn "$name\n";
my $feature=
Bio::SeqFeature::Generic->new(-display_name=>$name,-score=>$score,-start=>$start,-end=>$end);
$track->add_feature($feature);
}
print $panel->png;
__DATA__
#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
Scott
On Wed, 2003-08-06 at 13:31, bioperl-l-request at portal.open-bio.org
wrote:
> 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?
--
------------------------------------------------------------------------
Scott Cain, Ph. D. cain at cshl.org
GMOD Coordinator (http://www.gmod.org/) 216-392-3087
Cold Spring Harbor Laboratory
More information about the Bioperl-l
mailing list