There are two ways to get alphabets: directly through the corresponding class, or through the
.NET Bio supports several alphabet styles oriented around DNA, RNA and Proteins. For each group, there are two sub-groups: base and Ambiguous.
class has properties which let you select an alphabet, and methods to identify an alphabet based on a set of characters, or to perform validations on alphabets (to check if a given alphabet is included in another
For example, to use the base DNA alphabet, you can use:
var dnaAlphabet = Alphabets.DNA;
to use the ambiguous form, it would be:
var dnaAlphabet = Alphabets.AmbiguousDNA;
As mentioned, you can also go directly to the given class and use the static
property; for example:
var dnaAlphabet = DnaAlphabet.Instance;
Once you have an alphabet, you can examine the contents (valid symbols) or use it to construct a sequence.