Codon table generation awkward
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.
The confusion comes in because there aren't any "optimization tables", there are only codon tables, they just each have a slightly different structure.
You're right and I like this better syntactically. Any reason you can think of why we shouldn't do this @Koeng101?
Or rather. Things we should be aware?
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?
@TimothyStiles Is this issue close ? I see that the method GetCodonTable is already there in the codebase