biotite
biotite copied to clipboard
Feature Request: Option to translate NucleotideSequences with ambiguous alphabets
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.