| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# POD documentation - main docs before the code |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
GenOO::Data::File::FASTQ::Record - Object representing a record of a fastq file |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# Object representing a record of a fastq file |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# To initialize |
|
12
|
|
|
|
|
|
|
my $fastq_record = GenOO::Data::File::FASTQ::Record->new({ |
|
13
|
|
|
|
|
|
|
name => undef, #required |
|
14
|
|
|
|
|
|
|
sequence => undef, #required |
|
15
|
|
|
|
|
|
|
quality => undef, #required |
|
16
|
|
|
|
|
|
|
extra => undef, |
|
17
|
|
|
|
|
|
|
}); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This object represents a record of a fastq file and offers methods for accessing the different attributes. |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 EXAMPLES |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Return record name |
|
27
|
|
|
|
|
|
|
my $name = $fastq_record->name; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Let the code begin... |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
package GenOO::Data::File::FASTQ::Record; |
|
34
|
|
|
|
|
|
|
$GenOO::Data::File::FASTQ::Record::VERSION = '1.5.1'; |
|
35
|
1
|
|
|
1
|
|
5478
|
use Moose; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
22
|
|
|
36
|
1
|
|
|
1
|
|
8659
|
use namespace::autoclean; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
18
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has 'name' => (isa => 'Str', is => 'rw', required => 1); |
|
39
|
|
|
|
|
|
|
has 'sequence' => (isa => 'Str', is => 'rw', required => 1); |
|
40
|
|
|
|
|
|
|
has 'quality' => (isa => 'Str', is => 'rw', required => 1); |
|
41
|
|
|
|
|
|
|
has 'extra' => (is => 'rw'); |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
####################################################################### |
|
44
|
|
|
|
|
|
|
######################## Interface Methods ######################## |
|
45
|
|
|
|
|
|
|
####################################################################### |
|
46
|
|
|
|
|
|
|
sub to_string { |
|
47
|
1
|
|
|
1
|
0
|
1182
|
my ($self) = @_; |
|
48
|
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
50
|
return join("\n",( |
|
50
|
|
|
|
|
|
|
'@'.$self->name, |
|
51
|
|
|
|
|
|
|
$self->sequence, |
|
52
|
|
|
|
|
|
|
'+', |
|
53
|
|
|
|
|
|
|
$self->quality, |
|
54
|
|
|
|
|
|
|
)); |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
####################################################################### |
|
58
|
|
|
|
|
|
|
############################ Finalize ############################# |
|
59
|
|
|
|
|
|
|
####################################################################### |
|
60
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |