comparison variant_effect_predictor/Bio/Search/Hit/Fasta.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
2 #
3 # BioPerl module for Bio::Search::Hit::Fasta
4 #
5 # Cared for by Aaron Mackey <amackey@virginia.edu>
6 #
7 # Copyright Aaron Mackey
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::Search::Hit::Fasta - Hit object specific for Fasta-generated hits
16
17 =head1 SYNOPSIS
18
19 These objects are generated automatically by Bio::Search::Processor::Fasta,
20 and shouldn't be used directly.
21
22
23 =head1 DESCRIPTION
24
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.
29
30 =head1 FEEDBACK
31
32 =head2 Mailing Lists
33
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.
38
39 bioperl-l@bioperl.org - General discussion
40 http://bio.perl.org/MailList.html - About the mailing lists
41
42 =head2 Reporting Bugs
43
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:
47
48 bioperl-bugs@bio.perl.org
49 http://bugzilla.bioperl.org/
50
51 =head1 AUTHOR - Aaron Mackey
52
53 Email amackey@virginia.edu
54
55 =head1 APPENDIX
56
57 The rest of the documentation details each of the object
58 methods. Internal methods are usually preceded with a _
59
60 =cut
61
62 #'
63 # Let the code begin...
64
65 package Bio::Search::Hit::Fasta;
66
67 use vars qw($AUTOLOAD @ISA);
68 use strict;
69
70 # Object preamble - inherits from Bio::Root::Object
71
72 use Bio::Search::Hit::HitI;
73
74 @ISA = qw(Bio::Search::Hit::HitI);
75
76 my @AUTOLOAD_OK = qw( _ID
77 _DESC
78 _SIZE
79 _INITN
80 _INIT1
81 _OPT
82 _ZSC
83 _E_VAL
84 );
85
86 my %AUTOLOAD_OK = ();
87 @AUTOLOAD_OK{@AUTOLOAD_OK} = (1) x @AUTOLOAD_OK;
88
89 # new() is inherited from Bio::Root::Object
90
91 # _initialize is where the heavy stuff will happen when new is called
92
93 sub _initialize {
94 my($self, %args) = @_;
95
96 my $make = $self->SUPER::_initialize(%args);
97
98 while (my ($key, $val) = each %args) {
99 $key = '_' . uc($key);
100 $self->$key($val);
101 }
102
103 return $make; # success - we hope!
104 }
105
106 sub AUTOLOAD {
107 my ($self, $val) = @_;
108
109 $AUTOLOAD =~ s/.*:://;
110
111 if ( $AUTOLOAD_OK{$AUTOLOAD} ) {
112 $self->{$AUTOLOAD} = $val if defined $val;
113 return $self->{$AUTOLOAD};
114 } else {
115 $self->throw("Unallowed accessor: $AUTOLOAD !");
116 }
117 }
118
119 1;
120
121 __END__