line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finnigan::Reaction; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
68
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings FATAL => qw( all ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
81
|
|
5
|
|
|
|
|
|
|
our $VERSION = 0.0206; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
8
|
use Finnigan; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
36
|
|
8
|
2
|
|
|
2
|
|
8
|
use base 'Finnigan::Decoder'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
9
|
use overload ('""' => 'stringify'); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $fields = [ |
13
|
|
|
|
|
|
|
"precursor mz" => ['d<', 'Float64'], |
14
|
|
|
|
|
|
|
"unknown double" => ['d<', 'Float64'], |
15
|
|
|
|
|
|
|
"energy" => ['d<', 'Float64'], |
16
|
|
|
|
|
|
|
"unknown long[1]" => ['V', 'UInt32'], |
17
|
|
|
|
|
|
|
"unknown long[2]" => ['V', 'UInt32'], |
18
|
|
|
|
|
|
|
]; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub decode { |
21
|
23
|
|
|
23
|
1
|
33
|
my ($class, $stream) = @_; |
22
|
|
|
|
|
|
|
|
23
|
23
|
|
|
|
|
68
|
my $self = Finnigan::Decoder->read($stream, $fields); |
24
|
|
|
|
|
|
|
|
25
|
23
|
|
|
|
|
67
|
return bless $self, $class; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub precursor { |
29
|
5
|
|
|
5
|
1
|
34
|
shift->{data}->{"precursor mz"}->{value}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub energy { |
33
|
4
|
|
|
4
|
1
|
14
|
shift->{data}->{"energy"}->{value}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub stringify { |
37
|
3
|
|
|
3
|
1
|
8
|
my $self = shift; |
38
|
3
|
|
|
|
|
8
|
my $precursor = sprintf("%.2f", $self->precursor); |
39
|
3
|
|
|
|
|
9
|
my $energy = sprintf("%.2f", $self->energy); |
40
|
3
|
|
|
|
|
15
|
return "$precursor\@$Finnigan::activationMethod$energy"; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
__END__ |