[Bioperl-l] How to use Bio::Graphics::Glyph::dna?
Paul Boutros
paul.boutros at utoronto.ca
Sun Dec 24 03:46:27 UTC 2006
Hello,
I'm trying to get the dna glyph of Bio::Graphics to work and am having
some problems. I'm starting with a fasta file, and I am running perl
5.8.8 (ActiveState build 819) on WinXP and BioPerl 1.5.2
If I try simply using a Bio::Seq object like this:
$panel->add_track(
$segment,
-glyph => 'dna',
-do_gc => 'true',
-gc_window => 'auto'
);
I get the error:
Can't locate object method "start" via package "Bio::Seq" at
C:/Perl/site/lib/Bio/Graphics/FeatureBase.pm line 164.
And if I try creating a Bio::DB::GFFSegment object like this:
my $db = Bio::DB::GFF->new(
-adaptor => 'berkeleydb',
-create => 1,
-dsn => '/usr/local/share/gff/dmel'
);
$db->initialize(1);
$db->load_sequence_string(
$seq->primary_id(),
$seq->seq()
);
my $segment = Bio::DB::GFF::Segment->new(
$db,
$seq->primary_id(),
$seq->primary_id(),
1,
$seq->length()
);
$panel->add_track(
$segment,
-glyph => 'dna',
-do_gc => 'true',
-gc_window => 'auto'
);
I get the error:
------------- EXCEPTION: Bio::Root::NotImplemented -------------
MSG: Abstract method "Bio::FeatureHolderI::get_SeqFeatures" is not
implemented b
y package Bio::DB::GFF::Segment.
This is not your fault - author of Bio::DB::GFF::Segment should be blamed!
STACK: Error::throw
STACK: Bio::Root::Root::throw C:/Perl/site/lib/Bio/Root/Root.pm:359
STACK: Bio::Root::RootI::throw_not_implemented
C:/Perl/site/lib/Bio/Root/RootI.pm:522
STACK: Bio::FeatureHolderI::get_SeqFeatures
C:/Perl/site/lib/Bio/FeatureHolderI.pm:101
STACK: Bio::Graphics::Glyph::_subfeat
C:/Perl/site/lib/Bio/Graphics/Glyph.pm:1186
STACK: Bio::Graphics::Glyph::subfeat
C:/Perl/site/lib/Bio/Graphics/Glyph.pm:1167
STACK: Bio::Graphics::Glyph::new C:/Perl/site/lib/Bio/Graphics/Glyph.pm:56
STACK: Bio::Graphics::Glyph::Factory::make_glyph
C:/Perl/site/lib/Bio/Graphics/Glyph/Factory.pm:316
STACK: Bio::Graphics::Glyph::new C:/Perl/site/lib/Bio/Graphics/Glyph.pm:81
STACK: Bio::Graphics::Glyph::Factory::make_glyph
C:/Perl/site/lib/Bio/Graphics/Glyph/Factory.pm:316
STACK: Bio::Graphics::Panel::_add_track
C:/Perl/site/lib/Bio/Graphics/Panel.pm:388
STACK: Bio::Graphics::Panel::_do_add_track
C:/Perl/site/lib/Bio/Graphics/Panel.pm:360
STACK: Bio::Graphics::Panel::add_track
C:/Perl/site/lib/Bio/Graphics/Panel.pm:288
STACK: create_figure.pl:147
----------------------------------------------------------------
I'm really unsure what to try next, any suggestions much appreciated!
Paul
More information about the Bioperl-l
mailing list