| 1 | package MS::Reader::ProtXML; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use parent qw/MS::Reader::XML/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | use Carp; | ||
| 9 | |||
| 10 | use MS::Reader::ProtXML::Group; | ||
| 11 | |||
| 12 | |||
| 13 | sub _pre_load { | ||
| 14 | |||
| 15 | my ($self) = @_; | ||
| 16 | |||
| 17 | # ---------------------------------------------------------------------------# | ||
| 18 | # These tables are the main configuration point between the parser and the | ||
| 19 | # specific document schema. For more information, see the documentation | ||
| 20 | # for the parent class MS::Reader::XML | ||
| 21 | # ---------------------------------------------------------------------------# | ||
| 22 | |||
| 23 | $self->{_toplevel} = 'protein_summary'; | ||
| 24 | |||
| 25 | $self->{__record_classes} = { | ||
| 26 | protein_group => 'MS::Reader::ProtXML::Group', | ||
| 27 | }; | ||
| 28 | |||
| 29 | $self->{_skip_inside} = { map {$_ => 1} qw/ | ||
| 30 | protein_group | ||
| 31 | / }; | ||
| 32 | |||
| 33 | $self->{_make_index} = { map {$_ => 'group_number'} qw/ | ||
| 34 | protein_group | ||
| 35 | / }; | ||
| 36 | |||
| 37 | $self->{_make_named_array} = { | ||
| 38 | userParam => 'name', | ||
| 39 | }; | ||
| 40 | |||
| 41 | $self->{_make_named_hash} = { | ||
| 42 | parameter => 'name' | ||
| 43 | }; | ||
| 44 | |||
| 45 | $self->{_make_anon_array} = { map {$_ => 1} qw/ | ||
| 46 | analysis_summary | ||
| 47 | nsp_distribution | ||
| 48 | ni_distribution | ||
| 49 | protein_summary_data_filter | ||
| 50 | / }; | ||
| 51 | |||
| 52 | } | ||
| 53 | |||
| 54 | sub next_group { | ||
| 55 | |||
| 56 | my ($self) = @_; | ||
| 57 | return $self->next_record($self); | ||
| 58 | |||
| 59 | |||
| 60 | } | ||
| 61 | |||
| 62 | |||
| 63 | sub fetch_group { | ||
| 64 | |||
| 65 | my ($self, $idx) = @_; | ||
| 66 | |||
| 67 | return $self->fetch_record($self => $idx); | ||
| 68 | |||
| 69 | } | ||
| 70 | |||
| 71 | |||
| 72 | 1; | ||
| 73 | |||
| 74 | __END__ | ||