comparison lib/CPT/Bio/RBS.pm @ 1:d724f34e671d draft default tip

planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
author cpt
date Mon, 05 Jun 2023 02:50:07 +0000
parents
children
comparison
equal deleted inserted replaced
0:e4de0a0e90c8 1:d724f34e671d
1 package CPT::Bio::RBS;
2 use Moose;
3 use autodie;
4
5 has 'algo' => ( is => 'rw', isa => 'Str' );
6 has 'predictor' => ( is => 'rw', isa => 'Any' );
7 has 'only_best' => ( is => 'rw', isa => 'Bool', default => sub { 0 } );
8
9 sub set_algorithm {
10 my ( $self, $algorithm ) = @_;
11 if ( $algorithm eq 'naive' ) {
12 use CPT::Bio::RBS::Algo::Naive;
13 my $a = CPT::Bio::RBS::Algo::Naive->new();
14 $self->predictor($a);
15 }
16 else {
17 die 'Algorithm not implemented';
18 }
19 }
20
21 # Run the prediction on the sequence
22 sub predict {
23 my ( $self, $sequence ) = @_;
24 return $self->predictor()->predict(
25 sequence => lc($sequence),
26 return_best => $self->only_best(),
27 );
28 }
29
30 no Moose;
31 1;
32
33 __END__
34
35 =pod
36
37 =encoding UTF-8
38
39 =head1 NAME
40
41 CPT::Bio::RBS
42
43 =head1 VERSION
44
45 version 1.99.4
46
47 =head1 AUTHOR
48
49 Eric Rasche <rasche.eric@yandex.ru>
50
51 =head1 COPYRIGHT AND LICENSE
52
53 This software is Copyright (c) 2014 by Eric Rasche.
54
55 This is free software, licensed under:
56
57 The GNU General Public License, Version 3, June 2007
58
59 =cut