line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::CLPM::Amino; |
2
|
2
|
|
|
2
|
|
24479
|
use base qw(BioX::CLPM::Base); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
644
|
|
3
|
|
|
|
|
|
|
use Class::Std; |
4
|
|
|
|
|
|
|
use Class::Std::Utils; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use warnings; |
7
|
|
|
|
|
|
|
use strict; |
8
|
|
|
|
|
|
|
use Carp; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use version; our $VERSION = qv('0.0.1'); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
my %amino_acid_id_of :ATTR( :get :set :default<''> :init_arg ); |
14
|
|
|
|
|
|
|
my %letter_of :ATTR( :get :set :default<''> :init_arg ); |
15
|
|
|
|
|
|
|
my %mass_of :ATTR( :get :set :default<''> :init_arg ); |
16
|
|
|
|
|
|
|
my %type_of :ATTR( :get :set :default<''> :init_arg ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub START { |
19
|
|
|
|
|
|
|
my ($self, $ident, $arg_ref) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
if ( defined $arg_ref->{amino_acid_id} ) { |
22
|
|
|
|
|
|
|
$self->_load( $arg_ref ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
return; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _load { |
29
|
|
|
|
|
|
|
my ( $self, $arg_ref ) = @_; |
30
|
|
|
|
|
|
|
my $amino_acid_id = defined $arg_ref->{amino_acid_id} ? |
31
|
|
|
|
|
|
|
$arg_ref->{amino_acid_id} : |
32
|
|
|
|
|
|
|
$self->get_amino_acid_id(); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
if ( defined $arg_ref->{amino_acid_id} ) { |
35
|
|
|
|
|
|
|
$self->set_amino_acid_id($amino_acid_id); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $sql = 'select letter, mass, type '; |
39
|
|
|
|
|
|
|
$sql .= "from amino_acids where amino_acid_id = '$amino_acid_id'"; |
40
|
|
|
|
|
|
|
my ( $letter, $mass, $type ) = $self->sqlexec( $sql, '@' ); |
41
|
|
|
|
|
|
|
$self->set_letter( $letter ); |
42
|
|
|
|
|
|
|
$self->set_mass( $mass ); |
43
|
|
|
|
|
|
|
$self->set_type( $type ); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
49
|
|
|
|
|
|
|
__END__ |