7
bp_hmmer_to_table - turn HMMER output into tabular format
11
bp_hmmer_to_table [-e evaluefilter] [-b bitscorefilter] [--header] [-o outfile] inputfile1 inputfile2 ...
16
-e/--evalue evalue -- filter by evalue
17
-b/--bitscore bitscore -- filter by bitscore
18
--header -- boolean flag to print column header
19
-o/--out -- optional outputfile to write data,
20
otherwise will write to STDOUT
21
-h/--help -- show this documentation
23
Not technically a SearchIO script as this doesn't use any Bioperl
24
components but is a useful and fast. The output is tabular output.
26
query sequence/domain (these are flip-flopped for hmmsearch / hmmpfam)
29
domain/sequence name or PFAM accession
34
domain/sequence name (these are flip-flopped for hmmsearch / hmmpfam)
36
=head1 AUTHOR - Jason Stajich
38
Jason Stajich jason_at_bioperl-dot-org
44
my ($evalue,$bitscore,$header,$outfile);
46
'b|bitscore|bits:f' => \$bitscore,
47
'e|evalue:f' => \$evalue,
49
'o|out|outfile:s' => \$outfile,
50
'h|help' => sub { exec('perldoc',$0); exit; }
55
open($outfh, ">$outfile") || die("$outfile: $!");
60
my @fields = qw(QNAME QSTART QEND HACCESSION HSTART HEND SCORE EVALUE HNAME);
62
print $outfh join("\t", @fields), "\n";
66
if( s/^Query(\s+(sequence|HMM))?:\s+// ) {
69
} elsif( /^Parsed for domains:/ ) {
72
if(/^Model|Sequence\s+Domain/ ) { $ready = 1; }
73
elsif( $ready && /^\-\-/) { $ready = 2; }
74
elsif( /^Alignments of/ ) { undef %dat; last; }
75
elsif( $ready == 2 ) {
76
if( my ($n,$domainnum,$domainct, @vals) =
77
(m!^(\S+)\s+ # domain name
78
(\d+)\/(\d+)\s+ # num/num (ie 1 of 2)
79
(\d+)\s+(\d+).+? # sequence start and end
80
(\d+)\s+(\d+)\s+ # hmm start and end
85
next if( defined $bitscore && $vals[4] < $bitscore );
86
next if (defined $evalue && $vals[5] > $evalue);
87
print $outfh join("\t",