By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,245 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,245 IT Pros & Developers. It's quick & easy.

handle blastall errors

P: 1
Hi ,

I wrote the following script :

Expand|Select|Wrap|Line Numbers
  1. $program = "blastx";
  2. $db_ToBlast = "nr";
  3. $output_file = "results.txt";
  4. $input_file = "4599.fas";
  5. $expect_value = 0.00000000001;
  6. $number_of_seq = 2;
  7. $hitNumber = 0;
  8.  
  9. #Reading the sequence into the SeqIO object
  10.  
  11. $input_seqIO = Bio::SeqIO ->new(-file => $input_file , -format => 'Fasta');
  12.  
  13. #parameter array for the Blast program
  14.  
  15. @params = ('program' => $program, 'database' =>$db_ToBlast, 'outfile' =>$output_file, 'e' =>$expect_value );
  16.  
  17. $blast = Bio::Tools::Run::StandAloneBlast ->new(@params);
  18.  
  19. while($input_seq = $input_seqIO->next_seq)
  20. {
  21.      $Seqno = 1;
  22.      print " \n Run Blast \n";
  23.           $blast_report = $blast->blastall($input_seq);
  24.           $result = $blast_report->next_result;
  25.  
  26.          print "\n======================================";
  27.           print "\n BLAST hits for :".$input_seq->display_id. "\n";
  28.           print "======================================\n";
  29.  
  30.           $hitNumber = 0;
  31.           while((my $hit = $result->next_hit) && ($hitNumber<5))
  32.          {
  33.              print "\n Sequence ID : ". $hit->name ;
  34.              print "\n Description : ". $hit->description;
  35.              print "\n Length      : ". $hit->length;
  36.              print "\n Hit Start   : ". $hit->start('hit');
  37.              print "\n Hit End     : ".$hit->end('hit');
  38.              print "\n -------------------------------------------------------------------------";
  39.             $hitNumber = $hitNumber + 1;
  40.          }
  41.          $Seqno = $Seqno +  1; 
  42. }
The script is running fine. But if it encounters a sequence of low complexity blastall is returning the following error:

Expand|Select|Wrap|Line Numbers
  1. [blastall] WARNING:  [000.000]4599: SetUpBlastSearch failed.
  2. [blastall] ERROR:  [000.000]  4599: BLASTSetUpSearch: Unable to calculate Karlin-Altschul params, check query sequence
  3. [blastall] ERROR:  [000.000]  4599: BLASTSetUpSearch: Unable to calculate Karlin-Altschul params, check query sequence
  4. [blastall] ERROR:  [000.000]  4599: BLASTSetUpSearch: Unable to calculate Karlin-Altschul params, check query sequence
  5. [blastall] ERROR:  [000.000]  4599: BLASTSetUpSearch: Unable to calculate Karlin-Altschul params, check query sequence
  6. [blastall] ERROR:  [000.000]  4599: BLASTSetUpSearch: Unable to calculate Karlin-Altschul params, check query sequence
  7. [blastall] ERROR:  [000.000]  4599: BLASTSetUpSearch: Unable to calculate Karlin-Altschul params, check query sequence
4599 is the sequence name.

the script running on my cluster is exited due to the error. My input file contains a list of fasta sequences. I want my script to continue processing the next sequences by skipping the sequence that results in error without exiting.

Thank you ,
lp
Jan 24 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.