ModStringSet {Modstrings} | R Documentation

## ModStringSet objects

### Description

The `ModStringSet` class is a container for storing a set of `ModString` objects. It follows the same principles as the other `XStringSet` objects.

As usual the `ModStringSet` containers derive directly from the `XStringSet` virtual class.

The `ModStringSet` class is in itself a virtual class with two types of derivates:

- `ModDNAStringSet`

- `ModRNAStringSet`

Each class can only be converted to its parent `DNAStringSet` or `RNAStringSet`. The modified nucleotides will be converted to their original nucleotides.

Please note, that due to encoding issues not all modifications can be instanciated directly from the console. The vignette contains a comphrensive explanation and examples for working around the problem.

### Usage

    ModDNAStringSet(
      x = character(),
      start = NA,
      end = NA,
      width = NA,
      use.names = TRUE
    )

    ModRNAStringSet(
      x = character(),
      start = NA,
      end = NA,
      width = NA,
      use.names = TRUE
    )

### Arguments

`x` | Either a character vector (with no NAs), or an ModString, ModStringSet or ModStringViews object.
`start, end, width` | Either NA, a single integer, or an integer vector of the same length as x specifying how x should be "narrowed" (see ?narrow for the details).
`use.names` | TRUE or FALSE. Should names be preserved?

### Value

a `ModStringSet` object.

### Examples

    # Constructing ModDNAStringSet containing an m6A
    m1 <- ModDNAStringSet(c("AGCT`","AGCT`"))
    m1

    # converting to DNAStringSet

    # Constructing ModRNAStringSet containing an m6A
    m2 <- ModRNAStringSet(c("AGCU`","AGCU`"))
    m2

[Package Modstrings version 1.10.0 Index]