Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Perl 如何在NCBI中获得状态更新?_Perl_Blast_Status Message - Fatal编程技术网

Perl 如何在NCBI中获得状态更新?

Perl 如何在NCBI中获得状态更新?,perl,blast,status-message,Perl,Blast,Status Message,例如,我正在使用远程(NCBI)服务器为数千个EST序列运行独立的Blast+。我没有收到任何状态消息,比如100个序列中的15个正在运行。有可能得到这样的状态信息吗?或者使用perl脚本发送一个又一个序列的任何其他方式? 非常感谢 我建议使用Bioperl()和Bio::Tools::Run::RemoteBlast模块。请参阅,下面是他们在RemoteBlast.pm模块中给出的代码示例 while (my $input = $str->next_seq()){ #Blast

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

我建议使用Bioperl()和
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";
            }
          }
        }
      }
    }
  }
while(my$input=$str->next_seq()){
#针对数据库爆破序列:
#或者,您可以传入一个包含多个
#序列,而不是一次一个循环通过序列
#从“while(my$input=$str->next_seq())开始删除循环”
#把下面的两行换成一个例子。
my$r=$factory->submit\u blast($input);
#my$r=$factory->submit_blast('amino.fa');
如果($v>0),则打印标准“等待…”;
而(my@rids=$factory->each_rid){
foreach my$rid(@rids){
my$rc=$factory->retrieve_blast($rid);
如果(!ref($rc)){
如果($rc<0){
$factory->remove\u rid($rid);
}
如果($v>0),则打印标准字符“.”;
睡眠5;
}否则{
my$result=$rc->next_result();
#保存输出
我的$filename=$result->query\u name().“\.out”;
$factory->save_输出($filename);
$factory->remove\u rid($rid);
打印“\nQuery Name:”,$result->query\u Name(),“\n”;
while(my$hit=$result->next_hit){
其次,除非($v>0);
打印“\t name is”,$hit->name“\n”;
while(my$hsp=$hit->next_hsp){
打印“\t\t核心是”,$hsp->分数“\n”;
}
}
}
}
}
}
查看方法
retrieve_blast
()。它将返回一个状态代码,让您知道爆破作业是否完成。如果您有更多问题,请告诉我,我将尝试进一步澄清

保罗