[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 
/usr/lib/perl5/site_perl/5.8.0/Bio/DB/WebDBSeqI.pm:177

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) = @_;
   $self->_sleep;
   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 
/usr/lib/perl5/site_perl/5.8.0/Bio/DB/WebDBSeqI.pm:177

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

Vince

-- 
Vincenzo Forgetta

 Bioinformatics
  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