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

Update biotables.py #38

Closed
wants to merge 1 commit into from
Closed

Conversation

rfuisz
Copy link

@rfuisz rfuisz commented Jun 27, 2020

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 88.745% when pulling 1e29a18 on rfuisz:master into a37daef on Edinburgh-Genome-Foundry:master.

@Zulko
Copy link
Member

Zulko commented Jun 27, 2020

Thanks, this is a discovery to me! Apparently there is also a 22nd amino-acid called L-Pyrrolysine now!

That's a decision for @veghp to make, but my two cents is that I am unsure if adding this line here in DNA Chisel is the best way to provide support for selenocystine in DNA Chisel. It won't change the way that TGA will be translated to a stop codon, and TGA will still be considered synonymous with TAG and TAA (which do not encode for selenocystine), so your sequence optimization may loose the selenocystine, and translate(reverse_translate(seq)) would not always be seq anymore. So it's not a straightforward change.

I am not saying that it can't be handled on the Chisel side if necessary, but maybe it's worth pushing for selenocystine support on the biopython project. What they could do on the biopython side is create new custom tables with U support, and you would be able to use these in DNA Chisel.

One quick fix that would not require changes to Chisel or biopython is this at the beginning of your script:

from Bio.Data import CodonTable
CodonTable.unambiguous_dna_by_name['Standard'].back_table['U'] = 'TGA'
CodonTable.unambiguous_dna_by_name['Standard'].forward_table['TGA'] = 'U'

Another fix would be to add a new table "Custom Table" to unambiguous_dna_by_name and then provide that table's name when you use reverse-translate or EnforceTranslation.

Would that work for you?

@veghp
Copy link
Member

veghp commented Jun 28, 2020

Yes, I agree that fixing this for selenocysteine would break TGA for those who use it as the standard stop codon. Thanks @Zulko for the proposed alternative solutions.

@rfuisz
Copy link
Author

rfuisz commented Jun 29, 2020

thanks so much for the suggestions. I think that quick fix works just fine -- I'd only be interested in modifying the back_table since I don't want to break TGA as a stop codon in the more general case.

@veghp veghp closed this Sep 6, 2020
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.

None yet

4 participants