ModRNAString {Modstrings} | R Documentation

## ModDNAString class

### Description

A `ModRNAString` object allows RNA sequences with modified nucleotides to be stored and manipulated.

### Usage

    ModRNAString(x = "", start = 1, nchar = NA)

### Arguments

`x` | the input as a `character`.
`start` | the postion in the character vector to use as start position in the `ModRNAString` object (default `start = 1`).
`nchar` | the width of the character vector to use in the `ModRNAString` object (default `nchar = NA`). The end position is calculated as `start + nchar - 1`.

### Details

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.

### Value

a `ModRNAString` object

### Examples

    # Constructing ModDNAString containing an m6A and a dihydrouridine
    mr1 <- ModRNAString("AGCU`D")

    # 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)

[Package Modstrings version 1.6.0 Index]