0

例如,我正在使用远程 (NCBI) 服务器为数千个 EST 序列运行独立的 Blast+。我没有收到任何状态消息,例如 100 个序列中的 15 个正在运行。是否有可能获得任何这样的状态消息?或任何其他方式使用perl脚本一个接一个地发送序列?
非常感谢!

4

1 回答 1

0

我建议使用 Bioperl ( http://metacpan.org/pod/BioPerl ) 和Bio::Tools::Run::RemoteBlast模块。请参阅http://metacpan.org/pod/Bio::Tools::Run::RemoteBlast,这是他们在 RemoteBlast.pm 模块中提供的代码示例

 while (my $input = $str->next_seq()){
    #Blast a sequence against a database:    
    #Alternatively, you could  pass in a file with many
    #sequences rather than loop through sequence one at a time
    #Remove the loop starting 'while (my $input = $str->next_seq())'
    #and swap the two lines below for an example of that.
    my $r = $factory->submit_blast($input);
    #my $r = $factory->submit_blast('amino.fa');

    print STDERR "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 {
          my $result = $rc->next_result();
          #save the output
          my $filename = $result->query_name()."\.out";
          $factory->save_output($filename);
          $factory->remove_rid($rid);
          print "\nQuery Name: ", $result->query_name(), "\n";
          while ( my $hit = $result->next_hit ) {
            next unless ( $v > 0);
            print "\thit name is ", $hit->name, "\n";
            while( my $hsp = $hit->next_hsp ) {
              print "\t\tscore is ", $hsp->score, "\n";
            }
          }
        }
      }
    }
  }

查看方法retrieve_blasthttp://metacpan.org/pod/Bio::Tools::Run::RemoteBlast#retrieve_blast)。它将返回一个状态代码,让您知道爆破作业是否完成。如果您有更多问题,请告诉我,我会尝试进一步澄清。

保罗

于 2014-04-28T12:17:16.147 回答