[Bioperl-l] Bio::Graphics::Glyph::translation.pm

Dr. Todd Naumann tan10 at psu.edu
Wed Mar 3 16:03:45 EST 2004


I am trying to use the translation glyph and I am running into problems.
When I run the program below with glyph=>'dna' I get a picture of double
stranded DNA sequence as I expected. When I try to use
glyph=>'translation' I get the following error message:

Can't locate object method "translate" via package
"Bio::SeqFeature::Generic" at
/usr/lib/perl5/site_perl/5.8.2/Bio/Graphics/Glyph/translation.pm line
134, <GEN0> line 118.

I tried to find another SeqFeature object that has a translate method
but did not have any luck. If someone could point me in the right
direction I would really appreciate it.



use strict;
use warnings;

use Bio::Graphics;
use Bio::SeqFeature::Generic;
use Bio::SeqIO;

# initialize the graphics panel
my $panel = Bio::Graphics::Panel->new(-length => 80,
-width => 800,
-pad_left => 10,
-pad_right => 10,

# make the feature object
my $feature = Bio::SeqFeature::Generic->new(-start=>1,

# create a sequence object
my $seqIO_object = Bio::SeqIO->new(-file => 'test_sequence.gb',
-format => 'genbank',

my $seq_object = $seqIO_object->next_seq();

# attach sequence object to feature

# add track to panel
-glyph => 'translation',
-fgcolor => 'black',

print $panel->png;

Todd Naumann
Dept. of Chemistry
Penn State University
University Park, PA  16802

More information about the Bioperl-l mailing list