bump this version to avoid any collisions
[bioperl-live.git] / Bio / Search / Result / hmmer3Result.pm
blob5f5de6cabe7b19eaa57451ee279301ffc4709d42
1 # $Id: bioperl.lisp 15559 2009-02-23 12:11:20Z maj $
3 # BioPerl module for Bio::Search::Result::hmmer3Result
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Thomas Sharpton <thomas.sharpton@gmail.com>
9 # Copyright Thomas Sharpton
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::Search::Result::hmmer3Result - DESCRIPTION of Object
19 =head1 SYNOPSIS
21 Give standard usage here
23 =head1 DESCRIPTION
25 Describe the object here
27 =head1 FEEDBACK
29 =head2 Mailing Lists
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to
33 the Bioperl mailing list. Your participation is much appreciated.
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
38 =head2 Support
40 Please direct usage questions or support issues to the mailing list:
42 L<bioperl-l@bioperl.org>
44 rather than to the module maintainer directly. Many experienced and
45 reponsive experts will be able look at the problem and quickly
46 address it. Please include a thorough description of the problem
47 with code and data examples if at all possible.
49 =head2 Reporting Bugs
51 Report bugs to the Bioperl bug tracking system to help us keep track
52 of the bugs and their resolution. Bug reports can be submitted via
53 the web:
55 https://github.com/bioperl/bioperl-live/issues
57 =head1 AUTHOR - Thomas Sharpton
59 Email thomas.sharpton@gmail.com
61 Describe contact details here
63 =head1 CONTRIBUTORS
65 Additional contributors names and emails here
67 =head1 APPENDIX
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
72 =cut
75 # Let the code begin...
78 package Bio::Search::Result::hmmer3Result;
79 use strict;
81 use base qw(Bio::Search::Result::GenericResult);
83 =head2 new
85 Title : new
86 Usage : my $obj = new Bio::Search::Result::hmmer3Result.pm();
87 Function: Builds a new Bio::Search::Result::hmmer3Result.pm object
88 Returns : an instance of Bio::Search::Result::hmmer3Result.pm
89 Args : -hmm_name => string, name of hmm file
90 -sequence_file => name of the sequence file
92 =cut
94 sub new {
95 my($class,@args) = @_;
96 my $self = $class->SUPER::new(@args);
98 my ($hmm,$seqfile) = $self->_rearrange([qw(HMM_NAME SEQUENCE_FILE)],
99 @args);
100 defined( $seqfile ) && $self->sequence_file( $seqfile );
101 defined( $hmm ) && $self->hmm_name( $hmm );
103 return $self;
106 =head2 hmm_name
108 Title : hmm_name
109 Usage : $obj->hmm_name($newval)
110 Function: Get/Set the value of hmm_name
111 Returns : value of hmm_name
112 Args : newvalue (optional)
115 =cut
117 sub hmm_name{
118 my ($self,$value) = @_;
119 if( defined $value) {
120 $self->{'_hmm_name'} = $value;
122 return $self->{'_hmm_name'};
125 =head2 sequence_file
127 Title : sequence_file
128 Usage : $obj->sequence_file($newval)
129 Function: Get/Set the value of sequence_file
130 Returns : value of sequence_file
131 Args : newvalue (optional)
134 =cut
136 sub sequence_file{
137 my ($self,$value) = @_;
138 if( defined $value) {
139 $self->{'_sequence_file'} = $value;
141 return $self->{'_sequence_file'};
145 =head2 next_model
147 Title : next_model
148 Usage : my $domain = $result->next_model
149 Function: Returns the next domain - this
150 is an alias for next_hit
151 Returns : L<Bio::Search::Hit::HitI> object
152 Args : none
155 =cut
157 sub next_model{ shift->next_hit }
159 =head2 models
161 Title : models
162 Usage : my @domains = $result->models;
163 Function: Returns the list of HMM models seen - this
164 is an alias for hits()
165 Returns : Array of L<Bio::Search::Hit::HitI> objects
166 Args : none
169 =cut
171 sub models{ shift->hits }
173 =head2 rewind
175 Title : rewind
176 Usage : $result->rewind;
177 Function: Allow one to reset the Hit iteration to the beginning
178 Since this is an in-memory implementation
179 Returns : none
180 Args : none
182 =cut
184 sub rewind{
185 my ($self) = @_;
186 $self->{'_hitindex'} = 0;