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