Hi Bayo,
thank you for writing us.
It depends on what you want to do. If you know your sequence only consists of Dna characters than you can simply cast it to Dna and use the ordValue function to map the characters to an interval [0, AlphabetSize[. This has no runtime overhead.
But any symbol that is not in the Dna alphabet will be automatically converted to an 'A'.
If you want to preserve the Iupac meaning, you can use the function assign(Dna & target, Iupac const source).
This will convert the Iupac symbol to A,C,G or T depending on the bit mask of the current source character, where the bit for 'A' is preferred over the bit for 'C', which is preferred over 'G' and so on.
In the future it would be better to open a ticket for this on https://github.com/seqan/seqan/issues/.
IHTH!
cheers,
René
---
René Rahn
Ph.D. Student (de.NBI - CIBI)
--------------------------------
Institute of Computer Science
Algorithmic Bioinformatics (ABI)
--------------------------------
Freie Universität Berlin
Takustraße 9
14195 Berlin
--------------------------------
|