Skip to content

Commit

Permalink
add ambiguous codons tests for is_start_codon and modify ambiguous co…
Browse files Browse the repository at this point in the history
…dons tests for is_ter_codon
  • Loading branch information
Juke34 committed Feb 21, 2024
1 parent 120a20a commit d3ae01e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions t/SeqTools/CodonTable.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use strict;
BEGIN {
use Bio::Root::Test;

test_begin(-tests => 84);
test_begin(-tests => 87);

use_ok('Bio::Tools::CodonTable');
use_ok('Bio::CodonUsage::IO');
Expand Down Expand Up @@ -170,9 +170,13 @@ ok $myCodonTable->is_ter_codon('TaR'), 'is_ter_codon,TaR';
ok $myCodonTable->is_ter_codon('tRa'), 'is_ter_codon,tRa';
is $myCodonTable->is_ter_codon('ttA'), 0, 'is_ter_codon,ttA';

# Ambiguous codons should fail
is $myCodonTable->is_ter_codon('NNN'), 0, 'is_ter_codon, ambiguous codons should fail, NNN';
is $myCodonTable->is_ter_codon('TAN'), 0, 'is_ter_codon, ambiguous codons should fail, TAN';
# Ambiguous codons
is $myCodonTable->is_start_codon('NNN'), 1, 'is_start_codon, ambiguous codons should succeed, NNN';
is $myCodonTable->is_start_codon('ATN'), 1, 'is_start_codon, ambiguous codons should succeed, ATN';
is $myCodonTable->is_start_codon('CC'), 0, 'is_ter_codon, incomplete codons should fail, CC';

is $myCodonTable->is_ter_codon('NNN'), 1, 'is_ter_codon, ambiguous codons should succeed, NNN';
is $myCodonTable->is_ter_codon('TAN'), 1, 'is_ter_codon, ambiguous codons should succeed, TAN';
is $myCodonTable->is_ter_codon('CC'), 0, 'is_ter_codon, incomplete codons should fail, CC';

ok $myCodonTable->is_unknown_codon('jAG');
Expand Down

0 comments on commit d3ae01e

Please sign in to comment.