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

Removed update weights #410

Closed
wants to merge 2 commits into from
Closed

Removed update weights #410

wants to merge 2 commits into from

Conversation

Koeng101
Copy link
Contributor

@Koeng101 Koeng101 commented Dec 6, 2023

The current branch doesn't work with JSON codon tables. The expectation is and should be that when you call Optimize with a codon table, you get an optimized sequence back, not that you must update the codon table with itself.

For example, previously you'd have to do the following:

ct := ParseCodonJSON(ecoliCodonTable)
ct.UpdateWeights(ct.AminoAcids) // what? why are we updating a codon table with itself?
seq, err := ct.OptimizeSequence(protein, 0)

I think codon can be reduced quite a bit while maintaining functionality, so this is a start. For example:

  1. Remove all extraneous structs in table: TranslationMap, StartCodonTable, Choosers
  2. Remove table interface, have one table struct that contains the data for a codon table
  3. Remove all updating functions, treat codon tables as essentially static outside of initially building them (as this is almost universally how they are worked with)
  4. Remove functions for copying tables (ie, I cannot think of a single case where this is useful)

I think a lot of this stems from figuring out how codon tables are actually practically used. Ie, calculated extremely rarely, but used a lot.

I also removed ExampleTranslationTable_UpdateWeights, unless someone can think of a single real example of when this would be used.

@Koeng101 Koeng101 closed this Dec 7, 2023
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

Successfully merging this pull request may close these issues.

1 participant