FastParsers/Blast/Xml/Hsp.pm

filter: Statementstmt 83.0% 54 / 65 Branchbran 66.6% 8 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 73.1% 30 / 41 Podpod 100% 37 / 37 totaltotal 83.2% 129 / 155 CC 7 SCAR 4.1
CC
7
Cov
81%
hit_strand
2.1
query_strand
2.1
query_start
2.1
CRAP 1.5
« FastParsers/Blast/Xml/Iteration.pm ↑ Summary FastParsers/Blast/Xml/BlastOutput.pm »
1 package Bio::FastParsers::Blast::Xml::Hsp;
2 # ABSTRACT: NCBI BLAST DTD-derived internal class
3 7 $Bio::FastParsers::Blast::Xml::Hsp::VERSION = '0.221230';
4 7 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # AUTOGENERATED CODE! DO NOT MODIFY THIS FILE!
8  
9 7 ▶use XML::Bare qw(forcearray);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12  
13 # private attributes
14  
15 7 has '_root' => (
16 is => 'ro',
17 isa => 'HashRef',
18 required => 1,
19 );
20  
21 7 has '_parent' => (
22 is => 'ro',
23 isa => 'Maybe[Object]',
24 required => 1,
25 weak_ref => 1,
26 );
27  
28  
29 # public array(s) of composed objects
30  
31  
32 # public composed object(s)
33  
34  
35 # public methods
36  
37  
38 2 ▶sub align_len {
Subroutine align_len: called CC=1 SCAR=0.0
Pod documented
39 2 return shift->_root->{'Hsp_align-len'}->{'value'}
40 }
41  
42  
43 0 ▶sub bit_score {
Subroutine bit_score: not called CC=1 SCAR=6.9
Pod documented
44 0 return shift->_root->{'Hsp_bit-score'}->{'value'}
45 }
46  
47  
48 0 ▶sub density {
Subroutine density: not called CC=1 SCAR=6.9
Pod documented
49 0 return shift->_root->{'Hsp_density'}->{'value'}
50 }
51  
52  
53 0 ▶sub evalue {
Subroutine evalue: not called CC=1 SCAR=6.9
Pod documented
54 0 return shift->_root->{'Hsp_evalue'}->{'value'}
55 }
56  
57  
58 0 ▶sub gaps {
Subroutine gaps: not called CC=1 SCAR=6.9
Pod documented
59 0 return shift->_root->{'Hsp_gaps'}->{'value'}
60 }
61  
62  
63 2 ▶sub hit_frame {
Subroutine hit_frame: called CC=1 SCAR=0.0
Pod documented
64 2 return shift->_root->{'Hsp_hit-frame'}->{'value'}
65 }
66  
67  
68 2424 ▶sub hit_from {
Subroutine hit_from: called CC=1 SCAR=0.0
Pod documented
69 2424 return shift->_root->{'Hsp_hit-from'}->{'value'}
70 }
71  
72  
73 1861 ▶sub hit_to {
Subroutine hit_to: called CC=1 SCAR=0.0
Pod documented
74 1861 return shift->_root->{'Hsp_hit-to'}->{'value'}
75 }
76  
77  
78 0 ▶sub hseq {
Subroutine hseq: not called CC=1 SCAR=6.9
Pod documented
79 0 return shift->_root->{'Hsp_hseq'}->{'value'}
80 }
81  
82  
83 56 ▶sub identity {
Subroutine identity: called CC=1 SCAR=0.0
Pod documented
84 56 return shift->_root->{'Hsp_identity'}->{'value'}
85 }
86  
87  
88 40 ▶sub midline {
Subroutine midline: called CC=1 SCAR=0.0
Pod documented
89 40 return shift->_root->{'Hsp_midline'}->{'value'}
90 }
91  
92  
93 203 ▶sub num {
Subroutine num: called CC=1 SCAR=0.0
Pod documented
94 203 return shift->_root->{'Hsp_num'}->{'value'}
95 }
96  
97  
98 0 ▶sub pattern_from {
Subroutine pattern_from: not called CC=1 SCAR=6.9
Pod documented
99 0 return shift->_root->{'Hsp_pattern-from'}->{'value'}
100 }
101  
102  
103 0 ▶sub pattern_to {
Subroutine pattern_to: not called CC=1 SCAR=6.9
Pod documented
104 0 return shift->_root->{'Hsp_pattern-to'}->{'value'}
105 }
106  
107  
108 564 ▶sub positive {
Subroutine positive: called CC=1 SCAR=0.0
Pod documented
109 564 return shift->_root->{'Hsp_positive'}->{'value'}
110 }
111  
112  
113 0 ▶sub qseq {
Subroutine qseq: not called CC=1 SCAR=6.9
Pod documented
114 0 return shift->_root->{'Hsp_qseq'}->{'value'}
115 }
116  
117  
118 2 ▶sub query_frame {
Subroutine query_frame: called CC=1 SCAR=0.0
Pod documented
119 2 return shift->_root->{'Hsp_query-frame'}->{'value'}
120 }
121  
122  
123 1861 ▶sub query_from {
Subroutine query_from: called CC=1 SCAR=0.0
Pod documented
124 1861 return shift->_root->{'Hsp_query-from'}->{'value'}
125 }
126  
127  
128 1861 ▶sub query_to {
Subroutine query_to: called CC=1 SCAR=0.0
Pod documented
129 1861 return shift->_root->{'Hsp_query-to'}->{'value'}
130 }
131  
132  
133 258 ▶sub score {
Subroutine score: called CC=1 SCAR=0.0
Pod documented
134 258 return shift->_root->{'Hsp_score'}->{'value'}
135 }
136  
137  
138 # public aliases
139  
140  
141 0 ▶sub expect {
Subroutine expect: not called CC=1 SCAR=6.9
Pod documented
142 return shift->evalue
143 0 }
144  
145  
146 1 ▶sub qcov {
Subroutine qcov: called CC=1 SCAR=0.0
Pod documented
147 return shift->query_coverage
148 1 }
149  
150  
151 0 ▶sub scov {
Subroutine scov: not called CC=1 SCAR=6.9
Pod documented
152 return shift->subject_coverage
153 0 }
154  
155  
156 1 ▶sub pident {
Subroutine pident: called CC=1 SCAR=0.0
Pod documented
157 return shift->percentage_identity
158 1 }
159  
160  
161 0 ▶sub ppos {
Subroutine ppos: not called CC=1 SCAR=6.9
Pod documented
162 return shift->percentage_positive
163 0 }
164  
165  
166  
167 2 ▶sub query_len {
Subroutine query_len: called CC=1 SCAR=0.0
Pod documented
168 return shift->_parent->query_len
169 2 }
170  
171  
172  
173 2 ▶sub hit_len {
Subroutine hit_len: called CC=1 SCAR=0.0
Pod documented
174 return shift->_parent->len
175 2 }
176  
177  
178 # pseudo-aliases
179  
180 7 ▶use Const::Fast;
Subroutine BEGIN: called CC=1 SCAR=0.0
181 7 const my $NEGFRAME => qr{\A -}xms;
182  
183  
184 1 ▶sub hit_strand {
Subroutine hit_strand: called CC=2 SCAR=7.2
Pod documented
185 1 my $self = shift;
186 1 ▶ return $self->hit_frame =~ $NEGFRAME ? -1 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$self->hit_frame =~ /$NEGFRAME/ ? : 1 0 1
187 }
188  
189  
190 620 ▶sub hit_start {
Subroutine hit_start: called CC=2 SCAR=6.9
Pod documented
191 620 my $self = shift;
192 620 ▶ return $self->hit_from < $self->hit_to ? $self->hit_from
Branch: 1 branch
BranchTrueFalseTotal
$self->hit_from < $self->hit_to ? : 618 2 620
193 : $self->hit_to;
194 }
195  
196  
197 620 ▶sub hit_end {
Subroutine hit_end: called CC=2 SCAR=6.9
Pod documented
198 620 my $self = shift;
199 620 ▶ return $self->hit_to > $self->hit_from ? $self->hit_to
Branch: 1 branch
BranchTrueFalseTotal
$self->hit_to > $self->hit_from ? : 618 2 620
200 : $self->hit_from;
201 }
202  
203  
204 1 ▶sub query_strand {
Subroutine query_strand: called CC=2 SCAR=7.2
Pod documented
205 1 my $self = shift;
206 1 ▶ return $self->query_frame =~ $NEGFRAME ? -1 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$self->query_frame =~ /$NEGFRAME/ ? : 0 1 1
207 }
208  
209  
210 620 ▶sub query_start {
Subroutine query_start: called CC=2 SCAR=7.2
Pod documented
211 620 my $self = shift;
212 620 ▶ return $self->query_from < $self->query_to ? $self->query_from
Branch: 1 branch
BranchTrueFalseTotal
$self->query_from < $self->query_to ? : 620 0 620
213 : $self->query_to;
214 }
215  
216  
217 620 ▶sub query_end {
Subroutine query_end: called CC=2 SCAR=7.2
Pod documented
218 620 my $self = shift;
219 620 ▶ return $self->query_to > $self->query_from ? $self->query_to
Branch: 1 branch
BranchTrueFalseTotal
$self->query_to > $self->query_from ? : 620 0 620
220 : $self->query_from;
221 }
222  
223  
224 1 ▶sub query_coverage {
Subroutine query_coverage: called CC=1 SCAR=0.0
Pod documented
225 1 my $self = shift;
226 1 return sprintf("%.1f",
227 100 * ( $self->query_end - $self->query_start + 1 ) / $self->query_len
228 );
229 }
230  
231  
232 1 ▶sub subject_coverage {
Subroutine subject_coverage: called CC=1 SCAR=0.0
Pod documented
233 1 my $self = shift;
234 1 return sprintf("%.1f",
235 100 * ( $self->hit_end - $self->hit_start + 1 ) / $self->hit_len
236 );
237 }
238  
239  
240 1 ▶sub percentage_identity {
Subroutine percentage_identity: called CC=1 SCAR=0.0
Pod documented
241 1 my $self = shift;
242 1 return sprintf("%.1f", 100 * ( $self->identity / $self->align_len ) );
243 }
244  
245  
246 1 ▶sub percentage_positive {
Subroutine percentage_positive: called CC=1 SCAR=0.0
Pod documented
247 1 my $self = shift;
248 1 return sprintf("%.1f", 100 * ( $self->positive / $self->align_len ) );
249 }
250  
251  
252 7 __PACKAGE__->meta->make_immutable;
253 7 1;
254  
255 __END__
« FastParsers/Blast/Xml/Iteration.pm ↑ Summary FastParsers/Blast/Xml/BlastOutput.pm »