Description Details The RNA alphabet Constructor-like functions and generics Accessor methods Display Author(s) See Also Examples
An RNAString object allows efficient storage and manipulation of a long RNA sequence.
The RNAString class is a direct XString subclass (with no additional slot). Therefore all functions and methods described in the XString man page also work with an RNAString object (inheritance).
Unlike the BString container that allows storage of any single string (based on a single-byte character set) the RNAString container can only store a string based on the RNA alphabet (see below). In addition, the letters stored in an RNAString object are encoded in a way that optimizes fast search algorithms.
This alphabet is the same as the DNA alphabet, except that "T"
is replaced by "U"
. See ?DNA_ALPHABET
for more
information about the DNA alphabet.
The RNA alphabet is stored in the RNA_ALPHABET
predefined constant
(character vector).
The alphabet()
function returns RNA_ALPHABET
when
applied to an RNAString object.
In the code snippet below,
x
can be a single string (character vector of length 1),
a BString object or a DNAString object.
RNAString(x="", start=1, nchar=NA)
:
Tries to convert x
into an RNAString object by reading
nchar
letters starting at position start
in x
.
In the code snippet below, x
is an RNAString object.
alphabet(x, baseOnly=FALSE)
:
If x
is an RNAString object, then return the RNA
alphabet (see above).
See the corresponding man pages when x
is a
BString, DNAString or AAString object.
The letters in an RNAString object are colored when displayed by the
show()
method. Set global option Biostrings.coloring
to FALSE to turn off this coloring.
H. Pag<c3><a8>s
The RNAStringSet class to represent a collection of RNAString objects.
The XString and DNAString classes.
reverseComplement
alphabetFrequency
IUPAC_CODE_MAP
letter
1 2 3 4 5 6 7 8 9 10 11 12 | RNA_BASES
RNA_ALPHABET
dna <- DNAString("TTGAAAA-CTC-N")
rna <- RNAString(dna)
rna # 'options(Biostrings.coloring=FALSE)' to turn off coloring
alphabet(rna) # RNA_ALPHABET
alphabet(rna, baseOnly=TRUE) # RNA_BASES
## When comparing an RNAString object with a DNAString object,
## U and T are considered equals:
rna == dna # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.