1 package Bio
::SecreTary
::Helix
;
3 use namespace
::autoclean
;
6 isa
=> 'ArrayRef[Maybe[Num]]',
8 default => sub { [ undef, undef ] }
11 isa
=> 'ArrayRef[Maybe[Num]]',
13 default => sub { [ undef, undef ] }
16 isa
=> 'ArrayRef[Maybe[Num]]',
18 default => sub { [ undef, undef ] }
21 isa
=> 'ArrayRef[Maybe[Num]]',
23 default => sub { [ undef, undef ] }
26 isa
=> 'ArrayRef[Maybe[Num]]',
28 default => sub { [ undef, undef ] }
30 has score
=> ( isa
=> 'Maybe[Num]', is
=> 'rw', default => undef );
31 has nt_in
=> ( isa
=> 'Bool', is
=> 'rw', default => undef );
33 sub get_descriptor_string
{
36 my $offset = 1; # add this to 0-based positions to get unit-based
38 $string .= 'nt_in: ' . $self->nt_in() . "\n";
39 $string .= 'score: ' . $self->score() . "\n";
40 $string .= 'center: ' . join( ', ', @
{ $self->center() } ) . "\n";
41 $string .= 'nterm: ' . join( ', ', @
{ $self->nterm() } ) . "\n";
42 $string .= 'cterm: ' . join( ', ', @
{ $self->cterm() } ) . "\n";
43 $string .= 'sh_nterm: ' . join( ', ', @
{ $self->sh_nterm() } ) . "\n";
44 $string .= 'sh_cterm: ' . join( ', ', @
{ $self->sh_cterm() } ) . "\n";
47 my $npos = $self->nterm()->[0] + $offset;
48 my $npos_core = $self->sh_nterm()->[0] + $offset;
49 my $cpos = $self->cterm()->[0] + $offset;
50 my $cpos_core = $self->sh_cterm()->[0] + $offset;
51 my $center_pos = $self->center()->[0] + $offset;
57 . $self->score() . ' '
64 sub short_description
{
66 my $npos = $self->nterm()->[0] + 1;
67 my $cpos = $self->cterm()->[0] + 1;
68 return '[' . $self->score() . ",$npos,$cpos]";
71 __PACKAGE__
->meta->make_immutable;