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

Feature Request: Option to translate NucleotideSequences with ambiguous alphabets #503

Open
ncoish opened this issue Nov 15, 2023 · 0 comments

Comments

@ncoish
Copy link

ncoish commented Nov 15, 2023

The translate method on NucleotideSequence is very useful when you have an unambiguous sequence, but if the sequence contains symbols from the extended ambiguous alphabet, calling the translate method results in the following exception:

biotite.sequence.AlphabetError: Translation requires unambiguous alphabet

For my use-case it would be fine if codons containing ambiguity characters simply mapped to an "unknown residue" symbol like "X". Could a keyword argument be added to translate to allow for this behaviour? Maybe it would accept a "default" character to use in the case of failed translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants