[Bioperl-l] MSG: acc does not exist, but acc is OK and bioperl version is 1.2.2

Vince Forgetta vince.forgetta at staff.mcgill.ca
Fri Feb 20 10:14:40 EST 2004

Hi all,

I am trying to use bioperl to retrieve a refseq accession e.g. 
NM_003000, but it throws the following error:

------------- EXCEPTION  -------------
MSG: acc does not exist
STACK Bio::DB::WebDBSeqI::get_Seq_by_acc 

My code is:

    use Bio::DB::RefSeq;
    $gb = new Bio::DB::RefSeq;
    my $seq;
    $seq = $gb->get_Seq_by_acc('$accession');

I have version 1.2.2 so it's not a problem of changing "protein" to 
"nucleotide" in GenBank.pm.

When I change get_Seq_by_acc in WebDBSeqI.pm like so (added "$seqid" and 
"ARRAY" to distinguish between the error messages):

sub get_Seq_by_acc {
   my ($self,$seqid) = @_;
   my $seqio = $self->get_Stream_by_acc($seqid);
   $self->throw("acc $seqid does not exist") if( ! defined $seqio );
   my @seqs;
   while( my $seq = $seqio->next_seq() ) { push @seqs, $seq; }
   $self->throw("ARRAY acc does not exist") unless @seqs;
   if( wantarray ) { return @seqs } else { return shift @seqs }

I get:

------------- EXCEPTION  -------------
MSG: ARRAY acc does not exist
STACK Bio::DB::WebDBSeqI::get_Seq_by_acc 

so is the problem that the  retreival of the sequence fails? Very odd. 
Thanks for the help.


Vincenzo Forgetta

  McGill University and Genome Quebec Innovation Centre
  740 Dr. Penfield Avenue Room 7211
  Montreal, Quebec Canada, H3A 1A4

  Tel: 514-398-3311 00476 
  Email: vince.forgetta at staff.mcgill.ca

More information about the Bioperl-l mailing list