12/parse_hmmscan.pl
#!/usr/bin/perl -w
use strict;
print "protname\tlen\tdomname\tbegin\tend\n";
open(IN, 'clotting.tab') or die "could not open file\n";
while (<IN>) {
unless (/^\#/) { # avoid all lines beginning
# with the '#' character
my @columns = split(/ +/);
my $domname = $columns[0];
my $protname = $columns[3];
$protname =~ s/.*\|//;
my $len = $columns[5];
my $evalue = $columns[12];
my $begin = $columns[17];
my $end = $columns[18];
if ( $evalue < 1e-5 ) {
print "$protname\t$len\t$domname\t$begin\t$end\n";
}
}
}
close IN;