line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::SFF::Entry; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Bio::SFF::Entry::VERSION = '0.007'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
7
|
1
|
|
|
1
|
|
343
|
use Sub::Name; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use Scalar::Util qw/looks_like_number/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
437
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
for my $attr (qw/clip_qual_left clip_qual_right clip_adaptor_left clip_adaptor_right/) { |
12
|
|
|
|
|
|
|
has $attr => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
required => 1, |
15
|
|
|
|
|
|
|
isa => sub { |
16
|
|
|
|
|
|
|
return looks_like_number($_[0]); |
17
|
|
|
|
|
|
|
}, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
for my $attr (qw/name bases/){ |
22
|
|
|
|
|
|
|
has $attr => ( |
23
|
|
|
|
|
|
|
is => 'ro', |
24
|
|
|
|
|
|
|
required => 1, |
25
|
|
|
|
|
|
|
isa => sub { |
26
|
|
|
|
|
|
|
return defined && ref($_[0]) eq ''; |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my %unpack = ( |
32
|
|
|
|
|
|
|
flowgram_values => 'n*', |
33
|
|
|
|
|
|
|
flow_index_per_base => 'C*', |
34
|
|
|
|
|
|
|
quality_scores => 'C*', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
for my $attr(qw/flowgram_values flow_index_per_base quality_scores/) { |
38
|
|
|
|
|
|
|
my $raw = "${attr}_raw"; |
39
|
|
|
|
|
|
|
has $raw => ( |
40
|
|
|
|
|
|
|
is => 'ro', |
41
|
|
|
|
|
|
|
required => 1, |
42
|
|
|
|
|
|
|
init_arg => $attr, |
43
|
|
|
|
|
|
|
isa => sub { |
44
|
|
|
|
|
|
|
return defined && ref($_[0]) eq ''; |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
my $meth = "_$attr"; |
48
|
|
|
|
|
|
|
has "_$attr" => ( |
49
|
|
|
|
|
|
|
is => 'ro', |
50
|
|
|
|
|
|
|
init_arg => undef, |
51
|
|
|
|
|
|
|
lazy => 1, |
52
|
|
|
|
|
|
|
default => sub { |
53
|
|
|
|
|
|
|
return [ unpack $unpack{$attr}, $_[0]->$raw ]; |
54
|
|
|
|
|
|
|
}, |
55
|
|
|
|
|
|
|
); |
56
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
101
|
|
57
|
|
|
|
|
|
|
*{$attr} = subname($attr, sub { |
58
|
0
|
|
|
0
|
1
|
|
return @{ $_[0]->$meth }; |
|
0
|
|
|
0
|
1
|
|
|
|
|
|
|
0
|
1
|
|
|
59
|
|
|
|
|
|
|
}); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
#ABSTRACT: An SFF entry |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |