line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::MUST::Core::GeneticCode; |
2
|
|
|
|
|
|
|
# ABSTRACT: Genetic code for conceptual translation |
3
|
|
|
|
|
|
|
$Bio::MUST::Core::GeneticCode::VERSION = '0.212670'; |
4
|
17
|
|
|
17
|
|
11366
|
use Moose; |
|
17
|
|
|
|
|
52
|
|
|
17
|
|
|
|
|
126
|
|
5
|
17
|
|
|
17
|
|
124489
|
use namespace::autoclean; |
|
17
|
|
|
|
|
54
|
|
|
17
|
|
|
|
|
146
|
|
6
|
|
|
|
|
|
|
|
7
|
17
|
|
|
17
|
|
1595
|
use autodie; |
|
17
|
|
|
|
|
49
|
|
|
17
|
|
|
|
|
132
|
|
8
|
17
|
|
|
17
|
|
92479
|
use feature qw(say); |
|
17
|
|
|
|
|
51
|
|
|
17
|
|
|
|
|
1450
|
|
9
|
|
|
|
|
|
|
|
10
|
17
|
|
|
17
|
|
152
|
use Bio::MUST::Core::Constants qw(:gaps); |
|
17
|
|
|
|
|
45
|
|
|
17
|
|
|
|
|
2889
|
|
11
|
17
|
|
|
17
|
|
130
|
use aliased 'Bio::MUST::Core::Seq'; |
|
17
|
|
|
|
|
79
|
|
|
17
|
|
|
|
|
137
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'ncbi_id' => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
isa => 'Str', |
17
|
|
|
|
|
|
|
required => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# _code private hash for translation |
21
|
|
|
|
|
|
|
has '_code' => ( |
22
|
|
|
|
|
|
|
traits => ['Hash'], |
23
|
|
|
|
|
|
|
is => 'ro', |
24
|
|
|
|
|
|
|
isa => 'HashRef[Str]', |
25
|
|
|
|
|
|
|
required => 1, |
26
|
|
|
|
|
|
|
handles => { |
27
|
|
|
|
|
|
|
aa_for => 'get', |
28
|
|
|
|
|
|
|
amino_acid_for => 'get', |
29
|
|
|
|
|
|
|
}, |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub translate { ## no critic (RequireArgUnpacking) |
35
|
5
|
|
|
5
|
1
|
49
|
my $self = shift; |
36
|
5
|
|
|
|
|
16
|
my $seq = shift; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
return Seq->new( |
39
|
|
|
|
|
|
|
seq_id => $seq->full_id, # clone seq_id |
40
|
|
|
|
|
|
|
seq => join q{}, map { |
41
|
1491
|
|
66
|
|
|
52358
|
$self->aa_for(uc $_) // $FRAMESHIFT |
42
|
5
|
|
|
|
|
44
|
} @{ $seq->codons(@_) } |
|
5
|
|
|
|
|
36
|
|
43
|
|
|
|
|
|
|
); # specify frame through currying |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=pod |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Bio::MUST::Core::GeneticCode - Genetic code for conceptual translation |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
version 0.212670 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 SYNOPSIS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# TODO |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 DESCRIPTION |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# TODO |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 METHODS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 translate |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Denis BAURAIN <denis.baurain@uliege.be> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
82
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |