poly icon indicating copy to clipboard operation
poly copied to clipboard

Codon table generation awkward

Open Koeng101 opened this issue 4 years ago • 4 comments

It is kind of awkward generating codon tables. For example, an external user would input something like this -

seq := poly.ReadGbk("data/pichia_chr2.gb")
ct := seq.GetOptimizationTable(poly.GetCodonTable(11))

It might be a lot easier to give the sequence as a parameter for generating the table, for example

seq := poly.ReadGbk("data/pichia_chr2.gb")
ct := poly.GetCodonTable(seq, 11)

This change would be mildly more ergonomic, and clearer to the end users.

Koeng101 avatar May 02 '21 19:05 Koeng101

The confusion comes in because there aren't any "optimization tables", there are only codon tables, they just each have a slightly different structure.

Koeng101 avatar May 02 '21 19:05 Koeng101

You're right and I like this better syntactically. Any reason you can think of why we shouldn't do this @Koeng101?

TimothyStiles avatar May 05 '21 08:05 TimothyStiles

Or rather. Things we should be aware?

TimothyStiles avatar May 05 '21 08:05 TimothyStiles

Yea so the biggest one is something around this - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3115271/

You can express two different codon tables from a single genbank file. Though probably for historical reasons, the translation table is actually defined on the gene level, NOT the file level - https://www.ncbi.nlm.nih.gov/nuccore/CP060121.1

In addition, our code doesn't properly pick up start codon biases, which code for M, but can easily be codons like GTG or TTG in many E coli. It might be time to rethink this code?

Koeng101 avatar May 06 '21 03:05 Koeng101

@TimothyStiles Is this issue close ? I see that the method GetCodonTable is already there in the codebase

rkrishnasanka avatar Dec 18 '22 06:12 rkrishnasanka