NucleotideAlphabet-class {Biostrings}R Documentation

Class "NucleotideAlphabet" represents alphabets used in DNA or RNA


Each object of class "NucleotideAlphabet" represents a nucleotide alphabet. Usually this is the RNA or DNA alphabet and consists of ‘A’, ‘C’, ‘G’, ‘T’ for DNA and ‘A’, ‘C’, ‘G’, ‘U’ for RNA along with ‘-’ which represents a gap in the sequence.

Objects from the Class

A virtual Class: No objects may be created from it.


Object of class "character" representing the letters of the alphabet. Usually roman upper case letters are used. The one exception is the gap character which is always ‘-’.
Object of class "integer" representing the encoding used to represent these objects internally.


Class "BioAlphabet", directly.


BioStringNewValues(alphabet, length.string)
Given alphabet of class "NucleotideAlphabet" return a new uninitialized "BioString" object for that alphabet with length length.string. See BioString-class for more details.
initialize(.Object, letters)
Initialize an nucleotide alphabet object for the given letters. If one of the letters is not the gap character ‘-’, then it is added as the first letter. With the gap character, the length of the alphabet should be five. An encoding also created which is stored in the mapping slot.


Saikat DebRoy


myDNAAlph <- new("NucleotideAlphabet", letters=c('A', 'G', 'C', 'T'))
BioStringNewValues(myDNAAlph, 20)

[Package Biostrings version 1.4.0 Index]