[Bioperl-l] Re: Bioperl-l Digest, Vol 4, Issue 3

Wes Barris wes.barris at csiro.au
Wed Aug 6 20:35:55 EDT 2003


Scott Cain wrote:

> 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.

Hi Scott,

I have experienced the same exact problem described by Laurence.  I am
using the first example on this page:

	http://bioperl.org/HOWTOs/html/Graphics-HOWTO.html

I have tried this on a Redhat-7.2/Bioperl-1.2.1 system and on a
Redhat-8.0/Bioperl-1.2.2 system.  I both cases, the label was silently
omitted from the resulting png file.

Your example code uses "-display_name" where the HOW-TO example code
uses "-seq_id".  Neither produces a label.  Do you know what the difference
is?

Is installing from CVS the only way to resolve this?

> 
> 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?
> 
> 


-- 
Wes Barris
E-Mail: Wes.Barris at csiro.au



More information about the Bioperl-l mailing list