modernatx / seqlike

Unified biological sequence manipulation in Python
https://modernatx.github.io/seqlike
Apache License 2.0
207 stars 21 forks source link

random_codon_table not random for Isoleucine #83

Open amine-abdeljaoued opened 6 months ago

amine-abdeljaoued commented 6 months ago

The random_codon_table dictionary

https://github.com/modernatx/seqlike/blob/dde761ced5e3dcf86010d1e50abc3b268f794d8f/seqlike/codon_tables.py#L99

is biased for Isoleucine (I) with unequal probabilities for the three codons that code for it, while it has equal probabilities for all other Amino Acids.

ericmjl commented 6 months ago

This is a good catch, @amine-abdeljaoued! Let me check with @ndousis -- this definitely feels like a bug, right? Random is defined as "uniform probabilities" for the random_codon_table, just as the others are defined, so it looks like this bug needs to be fixed.

ndousis commented 6 months ago

Yeah, that looks like a bug!