[Bioperl-l] Re moteblast using Swissprot

manni122 markus.liebscher at gmx.de
Mon Apr 27 09:51:09 EDT 2009


Hi,
I want to retrieve the sequence identifier from the remoteblast interface
(Bio::Tools::Run::RemoteBlast). With this ID I want to look up annotations
stored in the Bio::DB::SwissProt.
I am using the example code from the RemoteBlast documentation. If I am
using a known sequence as input I get "Can't call method "next_hsp" on an
undefined value "? 
This happens only with swissprot as database - the nr database works fine.
The accession code from nr is not accepted from the Bio::DB::SwissProt.

Is there something wrong with the database?
Here is the code I am using:
my $v = 1;
my @params = ('-prog' => 'blastp', 
  		 '-data' => 'nr',
  		 '-expect' => '1e-10' ); #swissprot is not working

$Bio::Tools::Run::RemoteBlast::HEADER{'MATRIX_NAME'} = 'BLOSUM62';
my $factory = Bio::Tools::Run::RemoteBlast->new(@params);
  $v = 1;
my $r = $factory->submit_blast($proteinaa);
  print STDERR "Need BLAST Analysis, waiting..." if( $v > 0 );
  while ( my @rids = $factory->each_rid ) {
      foreach my $rid ( @rids ) {
  	  my $rc = $factory->retrieve_blast($rid);
  	  if( !ref($rc) ) {
  	      if( $rc < 0 ) { 		
  		      $factory->remove_rid($rid);
  		  }
  	      print STDERR "." if ( $v > 0 );
  	      sleep 5;
  	  } else { 
  	      $factory->remove_rid($rid);
  	      $result = $rc->next_result;
  	      $hit = $result->next_hit;		
	      $hsp = $hit->next_hsp;
	      $idneu = $hit->accession;
  	      }
  	  }
      
      }
-- 
View this message in context: http://www.nabble.com/Remoteblast-using-Swissprot-tp23256705p23256705.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.



More information about the Bioperl-l mailing list