| 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 | 1 | $GenOO::Data::File::FASTQ::Record::VERSION = '1.4.9'; | |
| 35 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 37 | |||
| 38 | 1 | has 'name' => (isa => 'Str', is => 'rw', required => 1); | |
| 39 | 1 | has 'sequence' => (isa => 'Str', is => 'rw', required => 1); | |
| 40 | 1 | has 'quality' => (isa => 'Str', is => 'rw', required => 1); | |
| 41 | 1 | has 'extra' => (is => 'rw'); | |
| 42 | |||
| 43 | ####################################################################### | ||
| 44 | ######################## Interface Methods ######################## | ||
| 45 | ####################################################################### | ||
| 46 | sub to_string { | ||
| 47 | 1 | ▶ | my ($self) = @_; |
|
Subroutine
to_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 48 | |||
| 49 | 1 | return join("\n",( | |
| 50 | '@'.$self->name, | ||
| 51 | $self->sequence, | ||
| 52 | '+', | ||
| 53 | $self->quality, | ||
| 54 | )); | ||
| 55 | } | ||
| 56 | |||
| 57 | ####################################################################### | ||
| 58 | ############################ Finalize ############################# | ||
| 59 | ####################################################################### | ||
| 60 | 1 | __PACKAGE__->meta->make_immutable; | |
| 61 | |||
| 62 | 1 | 1; | |