[Bioperl-l] A Bio::Graphics/Bio::Seq problem

Ed Green ed at compbio.berkeley.edu
Fri Jan 31 11:17:05 EST 2003


The example script in the SYNOPSIS section of the perldoc for Bio::Graphics
demonstrates the problem.  It calls Bio::SeqIO->next_seq on a user specified
file, which returns a Bio::Seq object.  This Bio::Seq object is used in the
constructor of Bio::Graphics::Panel, which attempts to call the (no longer
implemented) start.

Ed Green
 Graduate Student
 UC Berkeley
 461 Koshland Hall #3102
 Berkeley, CA  94720
 510-642-9614
 http:://compbio.berkeley.edu/people/ed/
 ed at compbio.berkeley.edu

-----Original Message-----
From: bioperl-l-bounces at bioperl.org [mailto:bioperl-l-bounces at bioperl.org]
On Behalf Of Lincoln Stein
Sent: Thursday, January 30, 2003 8:53 AM
To: boileau at essi.fr
Cc: bioperl-l at bioperl.org
Subject: Re: [Bioperl-l] A Bio::Graphics/Bio::Seq problem


I updated all the HOWTOs so that the incorrect call to Bio::Seq->start is no

longer used -- I thought I did it before the bioperl 1.2 release.  Where did

you see a code example that was calling it wrongly?

Lincoln


On Thursday 30 January 2003 10:49 am, boileau at essi.fr wrote:
> Thanks, your fix worked :)
>
> William Boileau
>
> > On Thu, 30 Jan 2003 boileau at essi.fr wrote:
> >> I asked the problem last week, but had no answers... Sorry to ask 
> >> it again, but I really don't know why it doesn't work... :-\
> >
> > Because there is an incompatibility in the object model that Lincoln 
> > was using and Bio::PrimarySeqI when Bio::RangeI was removed from the 
> > interface.
> >
> >> With the code below, I have the following error :
> >>
> >> Can't locate object method "start" via package "Bio::Seq" at 
> >> /usr/lib/perl5/site_perl/5.8.0/Bio/Graphics/Panel.pm line 45,<DATA> 
> >> line 141.
> >>
> >> When I change the type of the SeqFactory, the error is different 
> >> (the package is "Bio::PrimarySeq" instead of "Bio::Seq" when I 
> >> leave the type unchanged), but since the code is the same as the 
> >> one in the documentation, I don't understand the problem...Forgot 
> >> to say, the object $hit is "good".Thanks for your help !
> >
> > Short term fix:
> > my $factory = new Bio::Seq::SeqFactory(-type => 
> > 'Bio::LocatableSeq');
> >
> >> William Boileau
> >>
> >>
> >>
> >> @hsps = $hit->hsps();
> >>
> >> my $factory = new Bio::Seq::SeqFactory(-type => 'Bio::Seq');
> >>
> >> foreach my $hsp(@hsps) {
> >>   $query_string = $hsp->query_string;
> >>   $seq = $factory->create(-seq => $query_string,
> >>                             -id  => 'name');
> >>
> >>
> >>  my $panel = Bio::Graphics::Panel->new(
> >>                                        -segment   => $seq,
> >>                                        -key_style => 'between',
> >>                                        -width     => 800,
> >>                                        -pad_left  => 10,
> >>                                        -pad_right => 10,
> >>                                        -start => 1,
> >>                                        );
> >> }
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Bioperl-l mailing list
> >> Bioperl-l at bioperl.org http://bioperl.org/mailman/listinfo/bioperl-l
> >
> > --
> > Jason Stajich
> > Duke University
> > jason at cgt.mc.duke.edu 
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at bioperl.org http://bioperl.org/mailman/listinfo/bioperl-l
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org http://bioperl.org/mailman/listinfo/bioperl-l

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein at cshl.org			                  Cold Spring Harbor, NY
========================================================================


_______________________________________________
Bioperl-l mailing list
Bioperl-l at bioperl.org http://bioperl.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list