DNAString objects
A DNAString object allows efficient storage and manipulation of a long DNA sequence.
Unlike the BString container that allows storage of any single string (based on a single-byte character set) the DNAString container can only store a string based on the DNA alphabet (see below). In addition, the letters stored in a DNAString object are encoded in a way that optimizes fast search algorithms.
This alphabet contains all letters from the
IUPAC Extended Genetic Alphabet (see ?IUPAC_CODE_MAP)
plus "-" (the gap letter), "+" (the hard
masking letter), and "." (the not a letter or not
available letter).
It is stored in the DNA_ALPHABET predefined constant (character
vector).
The alphabet() function returns DNA_ALPHABET when
applied to a DNAString object.
DNAString(x="", start=1, nchar=NA):
Tries to convert x into a DNAString object by reading
nchar letters starting at position start in x.
In the code snippet below, x is a DNAString object.
The letters in a DNAString object are colored when displayed by the
show() method. Set global option Biostrings.coloring
to FALSE to turn off this coloring.
H. Pagès
The DNAStringSet class to represent a collection of DNAString objects.
DNA_BASES
DNA_ALPHABET
dna <- DNAString("TTGAAAA-CTC-N")
dna # 'options(Biostrings.coloring=FALSE)' to turn off coloring
length(dna)
alphabet(dna) # DNA_ALPHABET
alphabet(dna, baseOnly=TRUE) # DNA_BASESPlease choose more modern alternatives, such as Google Chrome or Mozilla Firefox.