[Bioperl-l] A Bio::Graphics/Bio::Seq problem
Jason Stajich
jason at cgt.mc.duke.edu
Thu Jan 30 09:45:01 EST 2003
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
More information about the Bioperl-l
mailing list