blast结果的m7格式转换为m8格式

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

while (<>)
{
   if (/Iteration_query-def/)
   {
   />(.*?)</;
   $out1=$1;
   }
   if (/Hit_def/)
   {
    />(.*?)</;
   $out2=$1;
   }
   if (/Hsp_bit-score/)
   {
    />(.*?)</;
   $out12=$1;
   }
   if (/Hsp_evalue/)
   {
   />(.*?)</;
   $out11=$1;
   }
   if (/Hsp_query-from/)
   {
     />(.*?)</;
   $out7=$1;
   }
   if (/Hsp_query-to/)
   {
   />(.*?)</;
   $out8=$1;
   }
   if (/Hsp_hit-from/)
   {
    />(.*?)</;
   $out9=$1;
   }
   if (/Hsp_hit-to/)
   {
    />(.*?)</;
   $out10=$1;
   }
   if (/Hsp_align-len/)
   {
   />(.*?)</;
   $out4=$1;
   }
   if (/Hsp_gaps/)
   {
    />(.*?)</;
   $out6=$1;
   }
     if (/Hsp_identity/)
   {
    />(.*?)</;
   $tmp=$1;
   }

   if (/Hsp_qseq/)
   {
    $out3=100*$tmp/$out4;
    $out3=sprintf"%0.2f",$out3;
    $out5=$out4-$tmp-$out6;
    print "$out1\t$out2\t$out3\t$out4\t$out5\t$out6\t$out7\t$out8\t$out9\t$out10\t$out11\t$out12\n";
   }

}