View source: R/Modstrings-ModString.R
ModRNAString | R Documentation |
A ModRNAString
object allows RNA sequences with modified nucleotides
to be stored and manipulated.
ModRNAString(x = "", start = 1, nchar = NA)
x |
the input as a |
start |
the postion in the character vector to use as start position in
the |
nchar |
the width of the character vector to use in the
|
The ModRNAString class contains the virtual ModString
class,
which is itself based on the XString
class. Therefore, functions for working with XString
classes are
inherited.
The alphabet of the ModRNAString class consist of the non-extended IUPAC
codes "A,G,C,U", the gap letter "-", the hard masking letter "+", the not
available letter "." and letters for individual modifications:
alphabet(ModRNAString())
.
Since the special characters are encoded differently depending on the OS and
encoding settings of the R session, it is not always possible to enter a RNA
sequence containing modified nucleotides via the R console. The most
convinient solution for this problem is to use the function
modifyNucleotides
and modify and existing RNAString or
ModRNAString object.
A ModRNAString
object can be converted into a RNAString
object
using the RNAstring()
constructor. Modified nucleotides are
automaitcally converted intro their base nucleotides.
If a modified RNA nucleotide you want to work with is not part of the alphabet, please let us know.
a ModRNAString
object
# Constructing ModDNAString containing an m6A and a dihydrouridine
mr1 <- ModRNAString("AGCU`D")
mr1
# the alphabet of the ModRNAString class
alphabet(mr1)
# due to encoding issues the shortNames can also be used
shortName(mr1)
# due to encoding issues the nomenclature can also be used
nomenclature(mr1)
# convert to RNAString
r1 <- RNAString(mr1)
r1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.