Bio/Search/Hit/Fasta.pm

filter: Statementstmt 53.8% 14 / 26 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod n/a totaltotal 45.9% 17 / 37 CC 4 SCAR 18.5
CC
4
Cov
44%
AUTOLOAD
12.0
_initialize
6.0
BEGIN
1.0
CRAP 6.4
« Bio/SeqFeature/SubSeq.pm ↑ Summary Bio/Annotation/TagTree.pm »
1 #
2 # BioPerl module for Bio::Search::Hit::Fasta
3 #
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
5 #
6 # Cared for by Aaron Mackey <amackey@virginia.edu>
7 #
8 # Copyright Aaron Mackey
9 #
10 # You may distribute this module under the same terms as perl itself
11  
12 # POD documentation - main docs before the code
13  
14 =head1 NAME
15  
16 Bio::Search::Hit::Fasta - Hit object specific for Fasta-generated hits
17  
18 =head1 SYNOPSIS
19  
20 # You wouldn't normally create these manually;
21 # instead they would be produced by Bio::SearchIO::fasta
22  
23 use Bio::Search::Hit::Fasta;
24 my $hit = Bio::Search::Hit::Fasta->new(id=>'LBL_6321', desc=>'lipoprotein', e_val=>0.01);
25  
26 =head1 DESCRIPTION
27  
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.
32  
33 =head1 SEE ALSO
34  
35 L<Bio::Search::Hit::HitI>,
36 L<Bio::Search::Hit::GenericHit>,
37 L<Bio::SearchIO::fasta>.
38  
39 =head1 FEEDBACK
40  
41 =head2 Mailing Lists
42  
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.
47  
48 bioperl-l@bioperl.org - General discussion
49 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
50  
51 =head2 Support
52  
53 Please direct usage questions or support issues to the mailing list:
54  
55 I<bioperl-l@bioperl.org>
56  
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.
61  
62 =head2 Reporting Bugs
63  
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:
67  
68 https://github.com/bioperl/bioperl-live/issues
69  
70 =head1 AUTHOR - Aaron Mackey
71  
72 Email amackey-at-virginia.edu
73  
74 =head1 APPENDIX
75  
76 The rest of the documentation details each of the object
77 methods. Internal methods are usually preceded with a _
78  
79 =cut
80  
81 #'
82 # Let the code begin...
83  
84 package Bio::Search::Hit::Fasta;
85 1 $Bio::Search::Hit::Fasta::VERSION = '1.7.8';
86 1 ▶use vars qw($AUTOLOAD);
Subroutine BEGIN: called CC=1 SCAR=0.0
87 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
88  
89 1 ▶use base qw(Bio::Search::Hit::HitI);
Subroutine BEGIN: called CC=1 SCAR=0.0
90  
91 1 my @AUTOLOAD_OK = qw(_ID _DESC _SIZE _INITN _INIT1 _OPT _ZSC _E_VAL);
92  
93 1 my %AUTOLOAD_OK = ();
94 1 @AUTOLOAD_OK{@AUTOLOAD_OK} = (1) x @AUTOLOAD_OK;
95  
96 =head2 _initialize
97  
98 Function: where the heavy stuff will happen when new is called
99  
100 =cut
101  
102 0 ▶sub _initialize {
Subroutine _initialize: not called CC=2 SCAR=17.9
103 0 my($self, %args) = @_;
104  
105 0 my $make = $self->SUPER::_initialize(%args);
106  
107 0 ▶ while (my ($key, $val) = each %args) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %args) 0 0 0
108 0 $key = '_' . uc($key);
109 0 $self->$key($val);
110 }
111  
112 0 return $make; # success - we hope!
113 }
114  
115 =head2 AUTOLOAD
116  
117 Function: Provide getter/setters for ID,DESC,SIZE,INITN,INIT1,OPT,ZSC,E_VAL
118  
119 =cut
120  
121 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=3 SCAR=24.8
122 0 my ($self, $val) = @_;
123  
124 0 $AUTOLOAD =~ s/.*:://;
125  
126 0 ▶ if ( $AUTOLOAD_OK{$AUTOLOAD} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($AUTOLOAD_OK{$Bio::Search::Hit::Fasta::AUTOLOAD}) { } 0 0 0
127 0 ▶ $self->{$AUTOLOAD} = $val if defined $val;
Branch: 1 branch
BranchTrueFalseTotal
if defined $val 0 0 0
128 0 return $self->{$AUTOLOAD};
129 } else {
130 0 $self->throw("Unallowed accessor: $AUTOLOAD !");
131 }
132 }
133  
134 1 1;
135  
« Bio/SeqFeature/SubSeq.pm ↑ Summary Bio/Annotation/TagTree.pm »