Skip to content

Commit

Permalink
Updated trunk to 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kgalinsky committed Oct 28, 2009
1 parent 24f4bcc commit 28769aa
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 44 deletions.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Revision history for JCVI-Translator

0.5.1 Apr 13 2009
- Better documentation in Utils
- Fixed bugs in JCVI::Translator::Utils::regex and find
- Fixed load test and added new tests

0.5.0 Apr 2 2009
- Split out the table into its own package
- Split out helper translator functions into their own package
Expand Down
9 changes: 5 additions & 4 deletions lib/JCVI/Translator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ use strict;
use warnings;

use version;
our $VERSION = qv('0.5.0');
our $VERSION = qv('0.5.1');

use base qw(Class::Accessor::Fast);
__PACKAGE__->mk_accessors(qw(table base));
Expand Down Expand Up @@ -618,14 +618,12 @@ sub translate_codon {
my %p = validate(
@p,
{

# Make sure strand is 1 or -1
strand => {
default => 1,
regex => qr/^[+-]?1$/,
type => Params::Validate::SCALAR
},

# Make sure it is a boolean value
start => {
default => 0,
Expand All @@ -636,8 +634,11 @@ sub translate_codon {
);

$codon = uc $codon;
my $rc = $p{strand} == 1 ? 0 : 1;

# Set up the translation table given the strand and whether this is
# searching for stop codons. Set up the not_found string by whether this
# is a start or not.
my $rc = $p{strand} == 1 ? 0 : 1;
my ( $table, $not_found );
unless ( $p{start} ) {
$table = $self->table->_forward->[$rc];
Expand Down
Loading

0 comments on commit 28769aa

Please sign in to comment.