Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start codon handling in 1.7.x #266

Open
nerdstrike opened this issue Jan 30, 2018 · 8 comments
Open

Start codon handling in 1.7.x #266

nerdstrike opened this issue Jan 30, 2018 · 8 comments

Comments

@nerdstrike
Copy link

nerdstrike commented Jan 30, 2018

The following fix was applied to 1.7 releases to deal with NNN mapping to a stop codon.

260ebb9

Ensembl also encounters unexpected behaviour around the handling of start codons, where Bio::Tools::CodonTable::is_start_codon('NNN') returns true. The cause is the same, i.e. the inversion of default behaviour, and so the solution should be pretty similar I hope!

I believe this also applies to 'NN' and other non-triplet equivalents too.

@cjfields
Copy link
Member

cjfields commented Feb 7, 2018

@nerdstrike have any code or examples we can test around? This generally helps 'speed' things along.

@nerdstrike
Copy link
Author

nerdstrike commented Feb 8, 2018


use strict;
use Bio::Tools::CodonTable;

my $table = Bio::Tools::CodonTable->new();

for my $codon (qw/NNN NN N ATG TAG TAA TGA/) {
  if ($table->is_start_codon($codon)) {
    print "$codon is a start codon\n";
  } elsif ($table->is_ter_codon($codon))  {
    print "$codon is a stop codon\n";
  } else {
    print "$codon is nonsense\n";
  }
}

Output from 1.2.3, 1.6.924,

NNN is nonsense
NN is nonsense
N is nonsense
ATG is a start codon
TAG is a stop codon
TAA is a stop codon
TGA is a stop codon

Output from 1.7.2,

NNN is a start codon <-----------
NN is nonsense
N is nonsense
ATG is a start codon
TAG is a stop codon
TAA is a stop codon
TGA is a stop codon

It's a niche problem, but occurs if you're fishing for start codons and don't know you're in a masked region or out of phase.

Also applies to NTG. It could be, yes, but the answer should be "maybe" at best.

@tseemann
Copy link

NTG = maybe
p=0.25 for eukaryotes
p>0.25 for bacteria
:-)

@cjfields
Copy link
Member

cjfields commented Feb 15, 2018 via email

@jimhu-tamu
Copy link
Member

Not just bacteria

http://www.jbc.org/content/285/7/4595.full
http://genome.cshlp.org/content/28/1/25.full

Curious about the incidence of CTG in bacteria with experimental confirmation. Citation?

@cjfields
Copy link
Member

cjfields commented Feb 15, 2018 via email

@jimhu-tamu
Copy link
Member

Whoops. Didn't realize Github would let me edit your reply when I meant to edit mine.

My colleague told me that CTG starts are known in phage T4.

@nerdstrike
Copy link
Author

I suppose I should clarify that my issue arises on the default codon table, but could nonetheless arise on alternate tables too.

carandraug added a commit that referenced this issue Apr 26, 2024
…dons (#266)

In the case of ambiguous codons this method should only return true if
all possible codons are start codons (same as is_ter_codon).  This was
the behaviour in BioPerl 1.2.3 but since at least BioPerl 1.6.924 it
returns true if at least one codon is a start codon.

This change fixes that regression and makes behaviour consistent with
is_ter_codon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants