【问题标题】:How to get status update in NCBI standalone BLAST?如何在 NCBI 独立 BLAST 中获取状态更新?
【发布时间】:2014-04-06 16:19:44
【问题描述】:

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

【问题讨论】:

    标签: perl blast status-message


    【解决方案1】:

    我建议使用 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)。它将返回一个状态代码,让您知道爆破作业是否完成。如果您有更多问题,请告诉我,我会尝试进一步澄清。

    保罗

    【讨论】:

      猜你喜欢
      • 2021-08-30
      • 2019-11-15
      • 2022-01-19
      • 1970-01-01
      • 2020-08-26
      • 2018-10-28
      • 2016-08-08
      • 2010-12-28
      • 2020-12-21
      相关资源
      最近更新 更多