Bio::Tools::HMMER::Results - Object representing HMMER output results


   # parse a hmmsearch file (can also parse a hmmpfam file)
   $res = new Bio::Tools::HMMER::Results( -file => 'output.hmm' , -type => 'hmmsearch');

   # print out the results for each sequence
   foreach $seq ( $res->each_Set ) {
       print "Sequence bit score is",$seq->bits,"\n";
       foreach $domain ( $seq->each_Domain ) {
           print " Domain start ",$domain->start," end ",$domain->end," score ",$domain->bits,"\n";
   # new result object on a sequence/domain cutoff of 25 bits sequence, 15 bits domain
   $newresult = $res->filter_on_cutoff(25,15);

   # alternative way of getting out all domains directly
   foreach $domain ( $res->each_Domain ) {
       print "Domain on ",$domain->seqname," with score ",$domain->bits," evalue ",$domain->evalue,"\n";


This object represents HMMER output, either from hmmsearch or hmmpfam. For hmmsearch, a series of HMMER::Set objects are made, one for each sequence, which have the the bits score for the object. For hmmpfam searches, only one Set object is made.

These objects come from the original HMMResults modules used internally in Pfam, written by Ewan. Ewan then converted them to bioperl objects in 1999. That conversion is meant to be backwardly compatible, but may not be (caveat emptor).


Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.          - General discussion     - Technically-oriented discussion             - About the mailing lists

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via email or the web:

AUTHOR - Ewan Birney


Describe contact details here


The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _


 Title   : number
 Usage   : print "There are ",$res->number," domains hit\n";
 Function: provides the number of domains in the HMMER report


 Title   : add_Domain
 Usage   : $res->add_Domain($unit)
 Function: adds a domain to the results array. Mainly used internally.
 Args    : A Bio::Tools::HMMER::Domain


 Title   : each_Domain
 Usage   : foreach $domain ( $res->each_Domain() )
 Function: array of Domain units which are held in this report
 Returns : array
 Args    : none


 Title   : domain_bits_cutoff_from_evalue
 Usage   : $cutoff = domain_bits_cutoff_from_evalue(0.01);
 Function: return a bits cutoff from an evalue using the
           scores here. Somewhat interesting logic:
            Find the two bit score which straddle the evalue
            if( 25 is between these two points) return 25
            else return the midpoint.

           This logic tries to ensure that with large signal to 
           noise separation one still has sensible 25 bit cutoff
 Returns : 
 Args    :


 Title   : write_FT_output
 Usage   : $res->write_FT_output(\*STDOUT,'DOMAIN')
 Function: writes feature table output ala swissprot
 Returns : 
 Args    :


 Title   : filter_on_cutoff
 Usage   : $newresults = $results->filter_on_cutoff(25,15);
 Function: Produces a new HMMER::Results module which has
           been trimmed at the cutoff. 
 Returns : a Bio::Tools::HMMER::Results module
 Args    : sequence cutoff and domain cutoff. in bits score
           if you want one cutoff, simply use same number both places


 Title   : write_ascii_out
 Usage   : $res->write_ascii_out(\*STDOUT)
 Function: writes as 
           seq seq_start seq_end model-acc model_start model_end model_name
 Returns : 
 Args    :

  FIXME: Now that we have no modelacc, this is probably a bad thing.


 Title   : write_GDF_bits
 Usage   : $res->write_GDF_bits(25,15,\*STDOUT)
 Function: writes GDF format with a sequence,domain threshold
 Returns : 
 Args    :


 Title   : add_Set
 Usage   : Mainly internal function
 Returns : 
 Args    :


 Title   : each_Set
 Usage   : 
 Returns : 
 Args    :


 Title   : get_Set
 Usage   : $set = $res->get_Set('sequence-name');
 Function: returns the Set for a particular sequence
 Returns : a HMMER::Set object
 Args    : name of the sequence


 Title   : _parse_hmmpfam
 Usage   : $res->parse_hmmpfam($filehandle)
 Returns : 
 Args    :


 Title   : _parse_hmmsearch
 Usage   : $res->_parse_hmmsearch($filehandle)
 Returns : 
 Args    :