best_kbm_hit.pl 289 B

1234567891011121314151617181920
  1. #!/usr/bin/perl -w
  2. #
  3. # Author: Jue Ruan
  4. #
  5. use strict;
  6. my $rs = [""];
  7. while(<>){
  8. my @ts = split;
  9. if($ts[0] eq $rs->[0]){
  10. $rs = \@ts if($ts[10] > $rs->[10]);
  11. } else {
  12. print join("\t", @{$rs}), "\n" if($rs->[10]);
  13. $rs = \@ts;
  14. }
  15. }
  16. print join("\t", @{$rs}), "\n" if($rs->[10]);
  17. 1;