Sync'ed RichSeqI with the implementation. RichSeq provides backward
[bioperl-live.git] / Bio / Search / Hit / Fasta.pm
blobe6838b6483a82e254ae044a2f95afb84aa6315be
3 # BioPerl module for Bio::Search::Hit::Fasta
5 # Cared for by Aaron Mackey <amackey@virginia.edu>
7 # Copyright Aaron Mackey
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 =head1 NAME
15 Bio::Search::Hit::Fasta - Hit object specific for Fasta-generated hits
17 =head1 SYNOPSIS
19 These objects are generated automatically by Bio::Search::Processor::Fasta,
20 and shouldn't be used directly.
23 =head1 DESCRIPTION
25 Bio::Search::Hit::* objects are data structures that contain information
26 about specific hits obtained during a library search. Some information will
27 be algorithm-specific, but others will be generally defined, such as the
28 ability to obtain alignment objects corresponding to each hit.
30 =head1 FEEDBACK
32 =head2 Mailing Lists
34 User feedback is an integral part of the evolution of this
35 and other Bioperl modules. Send your comments and suggestions preferably
36 to one of the Bioperl mailing lists.
37 Your participation is much appreciated.
39 bioperl-l@bioperl.org - General discussion
40 http://bio.perl.org/MailList.html - About the mailing lists
42 =head2 Reporting Bugs
44 Report bugs to the Bioperl bug tracking system to help us keep track
45 the bugs and their resolution. Bug reports can be submitted via email
46 or the web:
48 bioperl-bugs@bio.perl.org
49 http://bugzilla.bioperl.org/
51 =head1 AUTHOR - Aaron Mackey
53 Email amackey@virginia.edu
55 =head1 APPENDIX
57 The rest of the documentation details each of the object
58 methods. Internal methods are usually preceded with a _
60 =cut
63 # Let the code begin...
65 package Bio::Search::Hit::Fasta;
67 use vars qw($AUTOLOAD @ISA);
68 use strict;
70 # Object preamble - inherits from Bio::Root::Object
72 use Bio::Search::Hit::HitI;
74 @ISA = qw(Bio::Search::Hit::HitI);
76 my @AUTOLOAD_OK = qw( _ID
77 _DESC
78 _SIZE
79 _INITN
80 _INIT1
81 _OPT
82 _ZSC
83 _E_VAL
86 my %AUTOLOAD_OK = ();
87 @AUTOLOAD_OK{@AUTOLOAD_OK} = (1) x @AUTOLOAD_OK;
89 # new() is inherited from Bio::Root::Object
91 # _initialize is where the heavy stuff will happen when new is called
93 sub _initialize {
94 my($self, %args) = @_;
96 my $make = $self->SUPER::_initialize(%args);
98 while (my ($key, $val) = each %args) {
99 $key = '_' . uc($key);
100 $self->$key($val);
103 return $make; # success - we hope!
106 sub AUTOLOAD {
107 my ($self, $val) = @_;
109 $AUTOLOAD =~ s/.*:://;
111 if ( $AUTOLOAD_OK{$AUTOLOAD} ) {
112 $self->{$AUTOLOAD} = $val if defined $val;
113 return $self->{$AUTOLOAD};
114 } else {
115 $self->throw("Unallowed accessor: $AUTOLOAD !");
121 __END__