BioAlphabet-class {Biostrings}R Documentation

Class "BioAlphabet" represents alphabets used in biology


Each object of class "BioAlphabet" represents a particular alphabet used to represent some biological 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.
Object of class "character", the gap character in the alphabet.


initialize(.Object, letters)
Initialize an alphabet object. for the given letters. If one of the letters is not the gap character ‘-’, then it is added as the first letter. An encoding also created which is stored in the mapping slot.
gapletter(x) <- value
Change the letter representing gaps in x of class "BioPatternAlphabet" to value which must be a single letter not in the base alphabet of x.


Saikat DebRoy

See Also

NucleotideAlphabet-class and AminoAcidAlphabet-class, for two subclasses of the "BioAlphabet" class.


new("NucleotideAlphabet", letters=c('A', 'G', 'C', 'T'))
new("NucleotideAlphabet", letters=c('-', 'A', 'G', 'C', 'T'))

[Package Biostrings version 1.4.0 Index]