changes all issue tracking in preparation for switch to github issues
[bioperl-live.git] / Bio / Search / Hit / Fasta.pm
blob10c7259c8dd235222236645bd38b4799ac1cf1a9
2 # BioPerl module for Bio::Search::Hit::Fasta
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Aaron Mackey <amackey@virginia.edu>
8 # Copyright Aaron Mackey
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
14 =head1 NAME
16 Bio::Search::Hit::Fasta - Hit object specific for Fasta-generated hits
18 =head1 SYNOPSIS
20 # You wouldn't normally create these manually;
21 # instead they would be produced by Bio::SearchIO::fasta
23 use Bio::Search::Hit::Fasta;
24 my $hit = Bio::Search::Hit::Fasta->new(id=>'LBL_6321', desc=>'lipoprotein', e_val=>0.01);
26 =head1 DESCRIPTION
28 L<Bio::Search::Hit::HitI> objects are data structures that contain information
29 about specific hits obtained during a library search. Some information will
30 be algorithm-specific, but others will be generally defined, such as the
31 ability to obtain alignment objects corresponding to each hit.
33 =head1 SEE ALSO
35 L<Bio::Search::Hit::HitI>,
36 L<Bio::Search::Hit::GenericHit>,
37 L<Bio::SearchIO::fasta>.
39 =head1 FEEDBACK
41 =head2 Mailing Lists
43 User feedback is an integral part of the evolution of this
44 and other Bioperl modules. Send your comments and suggestions preferably
45 to one of the Bioperl mailing lists.
46 Your participation is much appreciated.
48 bioperl-l@bioperl.org - General discussion
49 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
51 =head2 Support
53 Please direct usage questions or support issues to the mailing list:
55 I<bioperl-l@bioperl.org>
57 rather than to the module maintainer directly. Many experienced and
58 reponsive experts will be able look at the problem and quickly
59 address it. Please include a thorough description of the problem
60 with code and data examples if at all possible.
62 =head2 Reporting Bugs
64 Report bugs to the Bioperl bug tracking system to help us keep track
65 the bugs and their resolution. Bug reports can be submitted via the
66 web:
68 https://github.com/bioperl/bioperl-live/issues
70 =head1 AUTHOR - Aaron Mackey
72 Email amackey-at-virginia.edu
74 =head1 APPENDIX
76 The rest of the documentation details each of the object
77 methods. Internal methods are usually preceded with a _
79 =cut
82 # Let the code begin...
84 package Bio::Search::Hit::Fasta;
86 use vars qw($AUTOLOAD);
87 use strict;
89 use base qw(Bio::Search::Hit::HitI);
91 my @AUTOLOAD_OK = qw(_ID _DESC _SIZE _INITN _INIT1 _OPT _ZSC _E_VAL);
93 my %AUTOLOAD_OK = ();
94 @AUTOLOAD_OK{@AUTOLOAD_OK} = (1) x @AUTOLOAD_OK;
96 =head2 _initialize
98 Function: where the heavy stuff will happen when new is called
100 =cut
102 sub _initialize {
103 my($self, %args) = @_;
105 my $make = $self->SUPER::_initialize(%args);
107 while (my ($key, $val) = each %args) {
108 $key = '_' . uc($key);
109 $self->$key($val);
112 return $make; # success - we hope!
115 =head2 AUTOLOAD
117 Function: Provide getter/setters for ID,DESC,SIZE,INITN,INIT1,OPT,ZSC,E_VAL
119 =cut
121 sub AUTOLOAD {
122 my ($self, $val) = @_;
124 $AUTOLOAD =~ s/.*:://;
126 if ( $AUTOLOAD_OK{$AUTOLOAD} ) {
127 $self->{$AUTOLOAD} = $val if defined $val;
128 return $self->{$AUTOLOAD};
129 } else {
130 $self->throw("Unallowed accessor: $AUTOLOAD !");