Standard bases.
Standard bases. Note that other bases are sometimes used as well (e.g. "N").
Are all the given bases standard?
Throw an error if any of the given bases are not standard.
Throw an error if the given base is not one of the canonical DNA bases.
Convert a base to a 1-character string.
Convert a base sequence to a String.
Watson-Crick complement of a sequence of bases.
Watson-Crick complement of a base.
Is the given base one of the 4 canonical DNA bases?
Watson-Crick complement of a sequence of bases, with the sequence reversed.
Convert a string (e.
Convert a string (e.g. "AAAGGC") to a byte array.
Convert a mixed sequence of bases (lower and upper-case) to upper case Lower-case bases typically represent masked bases
Convert a mixed sequence of bases (lower and upper-case) to upper case Lower-case bases typically represent masked bases
Works in place.
Byte array of bases
Unmasked (upper-case) byte array of bases
We represent a nucleotide base as a Byte, whose value is equal to the ASCII value of the character representing the base (for example: A, C, T, G). We represent a nucleotide sequence as a Seq[Byte].
This is an optimization over java Chars and Strings which use two bytes per character.
If b is a base (say "A") then b.toString does NOT give you want (in this case it would give you "65"). Use the baseToString() function defined here.