| 1 | package Bio::FastParsers::Blast::Xml::Iteration; | ||
| 2 | # ABSTRACT: NCBI BLAST DTD-derived internal class | ||
| 3 | 7 | $Bio::FastParsers::Blast::Xml::Iteration::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 | 7 | ▶ | use aliased 'Bio::FastParsers::Blast::Xml::Hit'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 7 | ▶ | use aliased 'Bio::FastParsers::Blast::Xml::Statistics'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | |||
| 15 | # private attributes | ||
| 16 | |||
| 17 | 7 | has '_root' => ( | |
| 18 | is => 'ro', | ||
| 19 | isa => 'HashRef', | ||
| 20 | required => 1, | ||
| 21 | ); | ||
| 22 | |||
| 23 | 7 | has '_parent' => ( | |
| 24 | is => 'ro', | ||
| 25 | isa => 'Maybe[Object]', | ||
| 26 | required => 1, | ||
| 27 | weak_ref => 1, | ||
| 28 | ); | ||
| 29 | |||
| 30 | |||
| 31 | # public array(s) of composed objects | ||
| 32 | |||
| 33 | |||
| 34 | 7 | has 'hits' => ( | |
| 35 | traits => ['Array'], | ||
| 36 | is => 'ro', | ||
| 37 | isa => 'ArrayRef[Bio::FastParsers::Blast::Xml::Hit]', | ||
| 38 | init_arg => undef, | ||
| 39 | lazy => 1, | ||
| 40 | builder => '_build_hits', | ||
| 41 | handles => { | ||
| 42 | count_hits => 'count', | ||
| 43 | all_hits => 'elements', | ||
| 44 | get_hit => 'get', | ||
| 45 | next_hit => 'shift', | ||
| 46 | }, | ||
| 47 | ); | ||
| 48 | |||
| 49 | ## no critic (ProhibitUnusedPrivateSubroutines) | ||
| 50 | |||
| 51 | 6 | ▶ | sub _build_hits { |
|
Subroutine
_build_hits: called CC=1 SCAR=0.0
| |||
| 52 | 6 | my $self = shift; | |
| 53 | 44 | return [ map { Hit->new( _root => $_, _parent => $self ) } @{ | |
| 54 | 6 | forcearray $self->_root->{'Iteration_hits'}->{'Hit'} | |
| 55 | } ]; | ||
| 56 | } | ||
| 57 | |||
| 58 | ## use critic | ||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | # public composed object(s) | ||
| 63 | |||
| 64 | |||
| 65 | 7 | has 'stat' => ( | |
| 66 | is => 'ro', | ||
| 67 | isa => 'Bio::FastParsers::Blast::Xml::Statistics', | ||
| 68 | init_arg => undef, | ||
| 69 | lazy => 1, | ||
| 70 | builder => '_build_stat', | ||
| 71 | ); | ||
| 72 | |||
| 73 | ## no critic (ProhibitUnusedPrivateSubroutines) | ||
| 74 | |||
| 75 | 0 | ▶ | sub _build_stat { |
|
Subroutine
_build_stat: not called CC=1 SCAR=6.9
| |||
| 76 | 0 | my $self = shift; | |
| 77 | return Statistics->new( | ||
| 78 | 0 | _root => $self->_root->{'Iteration_stat'}->{'Statistics'}, | |
| 79 | _parent => $self | ||
| 80 | ); | ||
| 81 | } | ||
| 82 | |||
| 83 | # use critic | ||
| 84 | |||
| 85 | |||
| 86 | # public methods | ||
| 87 | |||
| 88 | |||
| 89 | 0 | ▶ | sub iter_num { |
|
Subroutine
iter_num: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 90 | 0 | return shift->_root->{'Iteration_iter-num'}->{'value'} | |
| 91 | } | ||
| 92 | |||
| 93 | |||
| 94 | 0 | ▶ | sub message { |
|
Subroutine
message: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 95 | 0 | return shift->_root->{'Iteration_message'}->{'value'} | |
| 96 | } | ||
| 97 | |||
| 98 | |||
| 99 | 0 | ▶ | sub query_def { |
|
Subroutine
query_def: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 100 | 0 | return shift->_root->{'Iteration_query-def'}->{'value'} | |
| 101 | } | ||
| 102 | |||
| 103 | |||
| 104 | 0 | ▶ | sub query_id { |
|
Subroutine
query_id: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 105 | 0 | return shift->_root->{'Iteration_query-ID'}->{'value'} | |
| 106 | } | ||
| 107 | |||
| 108 | |||
| 109 | 2 | ▶ | sub query_len { |
|
Subroutine
query_len: called CC=1 SCAR=0.0
Pod
documented
| |||
| 110 | 2 | return shift->_root->{'Iteration_query-len'}->{'value'} | |
| 111 | } | ||
| 112 | |||
| 113 | |||
| 114 | # public aliases | ||
| 115 | |||
| 116 | |||
| 117 | 0 | ▶ | sub statistics { |
|
Subroutine
statistics: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 118 | return shift->stat | ||
| 119 | 0 | } | |
| 120 | |||
| 121 | |||
| 122 | 0 | ▶ | sub num { |
|
Subroutine
num: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 123 | return shift->iter_num | ||
| 124 | 0 | } | |
| 125 | |||
| 126 | |||
| 127 | 7 | __PACKAGE__->meta->make_immutable; | |
| 128 | 7 | 1; | |
| 129 | |||
| 130 | __END__ | ||