| 1 | package Bio::FastParsers::Blast::Xml::BlastOutput; | ||
| 2 | # ABSTRACT: NCBI BLAST DTD-derived internal class | ||
| 3 | 7 | $Bio::FastParsers::Blast::Xml::BlastOutput::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::Iteration'; |
|
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 | 7 | ▶ | use aliased 'Bio::FastParsers::Blast::Xml::Parameters'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | |||
| 16 | # private attributes | ||
| 17 | |||
| 18 | 7 | has '_root' => ( | |
| 19 | is => 'ro', | ||
| 20 | isa => 'HashRef', | ||
| 21 | required => 1, | ||
| 22 | ); | ||
| 23 | |||
| 24 | 7 | has '_parent' => ( | |
| 25 | is => 'ro', | ||
| 26 | isa => 'Maybe[Object]', | ||
| 27 | required => 1, | ||
| 28 | weak_ref => 1, | ||
| 29 | ); | ||
| 30 | |||
| 31 | |||
| 32 | # public array(s) of composed objects | ||
| 33 | |||
| 34 | |||
| 35 | 7 | has 'iterations' => ( | |
| 36 | traits => ['Array'], | ||
| 37 | is => 'ro', | ||
| 38 | isa => 'ArrayRef[Bio::FastParsers::Blast::Xml::Iteration]', | ||
| 39 | init_arg => undef, | ||
| 40 | lazy => 1, | ||
| 41 | builder => '_build_iterations', | ||
| 42 | handles => { | ||
| 43 | count_iterations => 'count', | ||
| 44 | all_iterations => 'elements', | ||
| 45 | get_iteration => 'get', | ||
| 46 | next_iteration => 'shift', | ||
| 47 | }, | ||
| 48 | ); | ||
| 49 | |||
| 50 | ## no critic (ProhibitUnusedPrivateSubroutines) | ||
| 51 | |||
| 52 | 6 | ▶ | sub _build_iterations { |
|
Subroutine
_build_iterations: called CC=1 SCAR=0.0
| |||
| 53 | 6 | my $self = shift; | |
| 54 | 7 | return [ map { Iteration->new( _root => $_, _parent => $self ) } @{ | |
| 55 | 6 | forcearray $self->_root->{'BlastOutput_iterations'}->{'Iteration'} | |
| 56 | } ]; | ||
| 57 | } | ||
| 58 | |||
| 59 | ## use critic | ||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | # public composed object(s) | ||
| 64 | |||
| 65 | |||
| 66 | 7 | has 'mbstat' => ( | |
| 67 | is => 'ro', | ||
| 68 | isa => 'Bio::FastParsers::Blast::Xml::Statistics', | ||
| 69 | init_arg => undef, | ||
| 70 | lazy => 1, | ||
| 71 | builder => '_build_mbstat', | ||
| 72 | ); | ||
| 73 | |||
| 74 | ## no critic (ProhibitUnusedPrivateSubroutines) | ||
| 75 | |||
| 76 | 0 | ▶ | sub _build_mbstat { |
|
Subroutine
_build_mbstat: not called CC=1 SCAR=6.9
| |||
| 77 | 0 | my $self = shift; | |
| 78 | return Statistics->new( | ||
| 79 | 0 | _root => $self->_root->{'BlastOutput_mbstat'}->{'Statistics'}, | |
| 80 | _parent => $self | ||
| 81 | ); | ||
| 82 | } | ||
| 83 | |||
| 84 | # use critic | ||
| 85 | |||
| 86 | |||
| 87 | 7 | has 'param' => ( | |
| 88 | is => 'ro', | ||
| 89 | isa => 'Bio::FastParsers::Blast::Xml::Parameters', | ||
| 90 | init_arg => undef, | ||
| 91 | lazy => 1, | ||
| 92 | builder => '_build_param', | ||
| 93 | ); | ||
| 94 | |||
| 95 | ## no critic (ProhibitUnusedPrivateSubroutines) | ||
| 96 | |||
| 97 | 5 | ▶ | sub _build_param { |
|
Subroutine
_build_param: called CC=1 SCAR=0.0
| |||
| 98 | 5 | my $self = shift; | |
| 99 | return Parameters->new( | ||
| 100 | 5 | _root => $self->_root->{'BlastOutput_param'}->{'Parameters'}, | |
| 101 | _parent => $self | ||
| 102 | ); | ||
| 103 | } | ||
| 104 | |||
| 105 | # use critic | ||
| 106 | |||
| 107 | |||
| 108 | # public methods | ||
| 109 | |||
| 110 | |||
| 111 | 5 | ▶ | sub db { |
|
Subroutine
db: called CC=1 SCAR=0.0
Pod
documented
| |||
| 112 | 5 | return shift->_root->{'BlastOutput_db'}->{'value'} | |
| 113 | } | ||
| 114 | |||
| 115 | |||
| 116 | 5 | ▶ | sub program { |
|
Subroutine
program: called CC=1 SCAR=0.0
Pod
documented
| |||
| 117 | 5 | return shift->_root->{'BlastOutput_program'}->{'value'} | |
| 118 | } | ||
| 119 | |||
| 120 | |||
| 121 | 0 | ▶ | sub query_def { |
|
Subroutine
query_def: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 122 | 0 | return shift->_root->{'BlastOutput_query-def'}->{'value'} | |
| 123 | } | ||
| 124 | |||
| 125 | |||
| 126 | 0 | ▶ | sub query_id { |
|
Subroutine
query_id: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 127 | 0 | return shift->_root->{'BlastOutput_query-ID'}->{'value'} | |
| 128 | } | ||
| 129 | |||
| 130 | |||
| 131 | 0 | ▶ | sub query_len { |
|
Subroutine
query_len: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 132 | 0 | return shift->_root->{'BlastOutput_query-len'}->{'value'} | |
| 133 | } | ||
| 134 | |||
| 135 | |||
| 136 | 0 | ▶ | sub query_seq { |
|
Subroutine
query_seq: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 137 | 0 | return shift->_root->{'BlastOutput_query-seq'}->{'value'} | |
| 138 | } | ||
| 139 | |||
| 140 | |||
| 141 | 0 | ▶ | sub reference { |
|
Subroutine
reference: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 142 | 0 | return shift->_root->{'BlastOutput_reference'}->{'value'} | |
| 143 | } | ||
| 144 | |||
| 145 | |||
| 146 | 0 | ▶ | sub version { |
|
Subroutine
version: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 147 | 0 | return shift->_root->{'BlastOutput_version'}->{'value'} | |
| 148 | } | ||
| 149 | |||
| 150 | |||
| 151 | # public aliases | ||
| 152 | |||
| 153 | |||
| 154 | 0 | ▶ | sub statistics { |
|
Subroutine
statistics: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 155 | return shift->mbstat | ||
| 156 | 0 | } | |
| 157 | |||
| 158 | |||
| 159 | 10 | ▶ | sub parameters { |
|
Subroutine
parameters: called CC=1 SCAR=0.0
Pod
documented
| |||
| 160 | return shift->param | ||
| 161 | 10 | } | |
| 162 | |||
| 163 | |||
| 164 | 7 | __PACKAGE__->meta->make_immutable; | |
| 165 | 7 | 1; | |
| 166 | |||
| 167 | __END__ | ||