[Bioperl-l] Bio::Graphics
Syed Mustafa Hussain
comp_sea at yahoo.com
Mon Feb 14 21:51:46 UTC 2011
Hi,
We had recently updated BioPerl and Bio::Graphics and found some applications not working properly. As an example simple graphics script like:
#####################################################
use Bio::Graphics::Panel;
use Bio::SeqFeature::Generic;
use CGI; # or any other CGI:: form handler/decoder
print "Content-type: text/html\n\n";
my $panel = Bio::Graphics::Panel->new(-length => 700,
-width => 700
);
my $track = $panel->add_track(-glyph => 'generic',
-label => 1
);
my $feature = Bio::SeqFeature::Generic->new(-start => 1,
-end => 400
);
$track->add_feature($feature);
print "<html><body>TEST IMAGE:<br>";
open GRAPH, "> /srv/www/htdocs/tmp/test.png" or die "could not open image file";
print GRAPH $panel->png;
close(GRAPH);
print "<img src=\"/tmp/test.png\">";
print "</body></html>";
#####################################################
is giving following error when I debug:
DB<1> n
Can't locate object method "attributes" via package "Bio::SeqFeature::Generic" at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph.pm line 703.
at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph.pm line 703
Bio::Graphics::Glyph::bgcolor('Bio::Graphics::Glyph::generic=HASH(0x1d62f90)') called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph.pm line 1299
Bio::Graphics::Glyph::filled_box('Bio::Graphics::Glyph::generic=HASH(0x1d62f90)', 'GD::Image=SCALAR(0x2002460)', 0, 0, 400, 7) called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph.pm line 1471
Bio::Graphics::Glyph::draw_component('Bio::Graphics::Glyph::generic=HASH(0x1d62f90)', 'GD::Image=SCALAR(0x2002460)', 0, 0, 0, 1) called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph/generic.pm line 347
Bio::Graphics::Glyph::generic::draw_component('Bio::Graphics::Glyph::generic=HASH(0x1d62f90)', 'GD::Image=SCALAR(0x2002460)', 0, 0, 0, 1) called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph.pm line 1050
Bio::Graphics::Glyph::draw('Bio::Graphics::Glyph::generic=HASH(0x1d62f90)', 'GD::Image=SCALAR(0x2002460)', 0, 0, 0, 1) called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph/generic.pm line 338
Bio::Graphics::Glyph::generic::draw('Bio::Graphics::Glyph::generic=HASH(0x1d62f90)', 'GD::Image=SCALAR(0x2002460)', 0, 0, 0, 1) called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Glyph/track.pm line 35
Bio::Graphics::Glyph::track::draw('Bio::Graphics::Glyph::track=HASH(0x1d5bb10)', 'GD::Image=SCALAR(0x2002460)', 0, 0, 0, 1) called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Panel.pm line 588
Bio::Graphics::Panel::gd('Bio::Graphics::Panel=HASH(0x1b1f6b0)') called at /usr/lib/perl5/site_perl/5.8.8/Bio/Graphics/Panel.pm line 1067
Bio::Graphics::Panel::png('Bio::Graphics::Panel=HASH(0x1b1f6b0)') called at test.cgi line 37
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
#####################################################
Is it because of some incompatibility between version of bioperl and bio::Graphics or some thing else?
Thanks,
Mustafa.
____________________________________________________________________________________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097
More information about the Bioperl-l
mailing list