line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::CLPM::Fragments::Linked; |
2
|
|
|
|
|
|
|
#use base qw(BioX::CLPM::Base); |
3
|
1
|
|
|
1
|
|
2376
|
use Class::Std; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
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 %fragment_id_1_of :ATTR( :get :set :default<''> :init_arg ); |
14
|
|
|
|
|
|
|
my %fragment_id_2_of :ATTR( :get :set :default<''> :init_arg ); |
15
|
|
|
|
|
|
|
my %mass_of :ATTR( :get :set :default<''> :init_arg ); |
16
|
|
|
|
|
|
|
my %mods_of :ATTR( :get :set :default<''> :init_arg ); |
17
|
|
|
|
|
|
|
my %type_of :ATTR( :get :set :default<''> :init_arg ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub START { |
20
|
|
|
|
|
|
|
my ($self, $ident, $arg_ref) = @_; |
21
|
|
|
|
|
|
|
if ( defined $arg_ref->{fragment_id} ) { $self->_load( $arg_ref ); } |
22
|
|
|
|
|
|
|
return; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _load { |
26
|
|
|
|
|
|
|
my ($self, $ident, $arg_ref) = @_; |
27
|
|
|
|
|
|
|
my $fragment_id = defined $arg_ref->{fragment_id} ? |
28
|
|
|
|
|
|
|
$arg_ref->{fragment_id} : |
29
|
|
|
|
|
|
|
$self->get_fragment_id(); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
if ( defined $arg_ref->{fragment_id} ) { |
32
|
|
|
|
|
|
|
$self->set_fragment_id($fragment_id); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $sql = 'select sequence_id, sequence, mass '; |
36
|
|
|
|
|
|
|
$sql .= "from fragments where fragment_id = '$fragment_id'"; |
37
|
|
|
|
|
|
|
my ( $sequence_id, $sequence, $mass) = $self->data->sqlexec( $sql, '@' ); |
38
|
|
|
|
|
|
|
$self->set_sequence_id($sequence_id); |
39
|
|
|
|
|
|
|
$self->set_sequence($sequence); |
40
|
|
|
|
|
|
|
$self->set_mass($mass); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
45
|
|
|
|
|
|
|
__END__ |