Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/SearchIO/EventHandlerI.pm @ 0:1f6dce3d34e0
Uploaded
| author | mahtabm |
|---|---|
| date | Thu, 11 Apr 2013 02:01:53 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:1f6dce3d34e0 |
|---|---|
| 1 # $Id: EventHandlerI.pm,v 1.8 2002/10/22 07:45:18 lapp Exp $ | |
| 2 # | |
| 3 # BioPerl module for Bio::SearchIO::EventHandlerI | |
| 4 # | |
| 5 # Cared for by Jason Stajich <jason@bioperl.org> | |
| 6 # | |
| 7 # Copyright Jason Stajich | |
| 8 # | |
| 9 # You may distribute this module under the same terms as perl itself | |
| 10 | |
| 11 # POD documentation - main docs before the code | |
| 12 | |
| 13 =head1 NAME | |
| 14 | |
| 15 Bio::SearchIO::EventHandlerI - An abstract Event Handler for Search Result parsing | |
| 16 | |
| 17 =head1 SYNOPSIS | |
| 18 | |
| 19 # do not use this object directly it is an interface | |
| 20 # See Bio::SearchIO::SearchResultEventBuilder for an implementation | |
| 21 | |
| 22 use Bio::SearchIO::SearchResultEventBuilder; | |
| 23 my $handler = new Bio::SearchIO::SearchResultEventBuilder(); | |
| 24 | |
| 25 =head1 DESCRIPTION | |
| 26 | |
| 27 This interface describes the basic methods needed to handle Events | |
| 28 thrown from parsing a Search Result such as FASTA, BLAST, or HMMer. | |
| 29 | |
| 30 =head1 FEEDBACK | |
| 31 | |
| 32 =head2 Mailing Lists | |
| 33 | |
| 34 User feedback is an integral part of the evolution of this and other | |
| 35 Bioperl modules. Send your comments and suggestions preferably to | |
| 36 the Bioperl mailing list. Your participation is much appreciated. | |
| 37 | |
| 38 bioperl-l@bioperl.org - General discussion | |
| 39 http://bioperl.org/MailList.shtml - About the mailing lists | |
| 40 | |
| 41 =head2 Reporting Bugs | |
| 42 | |
| 43 Report bugs to the Bioperl bug tracking system to help us keep track | |
| 44 of the bugs and their resolution. Bug reports can be submitted via | |
| 45 email or the web: | |
| 46 | |
| 47 bioperl-bugs@bioperl.org | |
| 48 http://bugzilla.bioperl.org/ | |
| 49 | |
| 50 =head1 AUTHOR - Jason Stajich | |
| 51 | |
| 52 Email jason@bioperl.org | |
| 53 | |
| 54 Describe contact details here | |
| 55 | |
| 56 =head1 CONTRIBUTORS | |
| 57 | |
| 58 Additional contributors names and emails here | |
| 59 | |
| 60 =head1 APPENDIX | |
| 61 | |
| 62 The rest of the documentation details each of the object methods. | |
| 63 Internal methods are usually preceded with a _ | |
| 64 | |
| 65 =cut | |
| 66 | |
| 67 | |
| 68 # Let the code begin... | |
| 69 | |
| 70 | |
| 71 package Bio::SearchIO::EventHandlerI; | |
| 72 use vars qw(@ISA); | |
| 73 use strict; | |
| 74 use Carp; | |
| 75 | |
| 76 use Bio::Event::EventHandlerI; | |
| 77 | |
| 78 @ISA = qw (Bio::Event::EventHandlerI); | |
| 79 | |
| 80 =head2 start_result | |
| 81 | |
| 82 Title : start_result | |
| 83 Usage : $handler->start_result($data) | |
| 84 Function: Begins a result event cycle | |
| 85 Returns : none | |
| 86 Args : Type of Result | |
| 87 | |
| 88 =cut | |
| 89 | |
| 90 sub start_result { | |
| 91 my ($self) = @_; | |
| 92 $self->throw_not_implemented(); | |
| 93 } | |
| 94 | |
| 95 =head2 end_result | |
| 96 | |
| 97 Title : end_result | |
| 98 Usage : $handler->end_result($data) | |
| 99 Function: Ends a result event cycle | |
| 100 Returns : Bio::Search::Result::ResultI object | |
| 101 Args : none | |
| 102 | |
| 103 | |
| 104 =cut | |
| 105 | |
| 106 sub end_result{ | |
| 107 my ($self,@args) = @_; | |
| 108 $self->throw_not_implemented(); | |
| 109 } | |
| 110 | |
| 111 =head2 start_hsp | |
| 112 | |
| 113 Title : start_hsp | |
| 114 Usage : $handler->start_hsp($data) | |
| 115 Function: Start a HSP event cycle | |
| 116 Returns : none | |
| 117 Args : type of element | |
| 118 associated hashref | |
| 119 | |
| 120 =cut | |
| 121 | |
| 122 sub start_hsp{ | |
| 123 my ($self,@args) = @_; | |
| 124 $self->throw_not_implemented(); | |
| 125 } | |
| 126 | |
| 127 =head2 end_hsp | |
| 128 | |
| 129 Title : end_hsp | |
| 130 Usage : $handler->end_hsp() | |
| 131 Function: Ends a HSP event cycle | |
| 132 Returns : Bio::Search::HSP::HSPI object | |
| 133 Args : type of event and associated hashref | |
| 134 | |
| 135 =cut | |
| 136 | |
| 137 sub end_hsp{ | |
| 138 my ($self,@args) = @_; | |
| 139 $self->throw_not_implemented(); | |
| 140 } | |
| 141 | |
| 142 =head2 start_hit | |
| 143 | |
| 144 Title : start_hit | |
| 145 Usage : $handler->start_hit() | |
| 146 Function: Starts a Hit event cycle | |
| 147 Returns : none | |
| 148 Args : type of event and associated hashref | |
| 149 | |
| 150 | |
| 151 =cut | |
| 152 | |
| 153 sub start_hit { | |
| 154 my ($self,@args) = @_; | |
| 155 $self->throw_not_implemented | |
| 156 } | |
| 157 | |
| 158 =head2 end_hit | |
| 159 | |
| 160 Title : end_hit | |
| 161 Usage : $handler->end_hit() | |
| 162 Function: Ends a Hit event cycle | |
| 163 Returns : Bio::Search::Hit::HitI object | |
| 164 Args : type of event and associated hashref | |
| 165 | |
| 166 | |
| 167 =cut | |
| 168 | |
| 169 sub end_hit { | |
| 170 my ($self,@args) = @_; | |
| 171 $self->throw_not_implemented(); | |
| 172 } | |
| 173 | |
| 174 | |
| 175 =head2 register_factory | |
| 176 | |
| 177 Title : register_factory | |
| 178 Usage : $handler->register_factory('TYPE',$factory); | |
| 179 Function: Register a specific factory for a object type class | |
| 180 Returns : none | |
| 181 Args : string representing the class and | |
| 182 Bio::Factory::ObjectFactoryI | |
| 183 | |
| 184 See L<Bio::Factory::ObjectFactoryI> for more information | |
| 185 | |
| 186 =cut | |
| 187 | |
| 188 sub register_factory{ | |
| 189 my ($self,@args) = @_; | |
| 190 $self->throw_not_implemented(); | |
| 191 } | |
| 192 | |
| 193 | |
| 194 =head2 factory | |
| 195 | |
| 196 Title : factory | |
| 197 Usage : my $f = $handler->factory('TYPE'); | |
| 198 Function: Retrieves the associated factory for requested 'TYPE' | |
| 199 Returns : a Bio::Factory::ObjectFactoryI or undef if none registered | |
| 200 Args : name of factory class to retrieve | |
| 201 | |
| 202 See L<Bio::Factory::ObjectFactoryI> for more information | |
| 203 | |
| 204 =cut | |
| 205 | |
| 206 sub factory{ | |
| 207 my ($self,@args) = @_; | |
| 208 $self->throw_not_implemented(); | |
| 209 } | |
| 210 | |
| 211 =head2 Bio::Event::EventHandlerI methods | |
| 212 | |
| 213 =cut | |
| 214 | |
| 215 =head2 will_handle | |
| 216 | |
| 217 Title : will_handle | |
| 218 Usage : if( $handler->will_handle($event_type) ) { ... } | |
| 219 Function: Tests if this event builder knows how to process a specific event | |
| 220 Returns : boolean | |
| 221 Args : event type name | |
| 222 | |
| 223 | |
| 224 =cut | |
| 225 | |
| 226 =head2 SAX methods | |
| 227 | |
| 228 See L<Bio::Event::EventHandlerI> for the additional SAX methods. | |
| 229 | |
| 230 =cut | |
| 231 | |
| 232 | |
| 233 1; |
