[Bioperl-l] revcom bug?

Heikki Lehvaslaiho heikki@ebi.ac.uk
Wed, 14 Nov 2001 11:43:37 +0000


Tony,

Which bioperl version you are using?

I tried this on head and 0.7 branch without any problems:

--------------------
use Bio::PrimarySeq;
my $a = new Bio::PrimarySeq( -id=>'b',
                             -seq=>'gctgctgctgctggc'
                            );
print $a->revcom()->seq, "\n";
--------------------


... You seem to be running HEAD. 

PrimarySeqI.pm line 386 calls $self->alphabet which should call 
alphabet() in Bio::PrimarySeq, but instead Bio::PrimarySeqI::alphabet
is being called.  Add line 

print "$pseq\n";

just before the line causing problems to find out what object it is since it
seems to think it is Bio::PrimarySeqI which dies not make any sense.

	-Heikki



Tony Cox wrote:
> 
> I was trying to revcom a primary seq object
> 
>     if ($opt_ref->{'r'}){
>                 eval{
>                         $pseq = $pseq->revcom();
>                 };
>                 print $@ if($@);
>     }
> 
> -----------------
> MSG: Bio::PrimarySeqI definition of seq - implementing class did not provide
> this method
> STACK Bio::PrimarySeqI::alphabet bioperl-live/Bio/PrimarySeqI.pm:327
> STACK Bio::PrimarySeqI::revcom bioperl-live/Bio/PrimarySeqI.pm:386
> STACK (eval) ./pfetch_srv:435
> STACK pfetch::set_sequence_options ./pfetch_srv:434
> STACK pfetch::make_new_child ./pfetch_srv:241
> STACK toplevel ./pfetch_srv:89
> -------------------------------------------
> 
> Am I doing something dumb or is this a bug?
> 
> thanks
> Tony
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________