XNAStringSet-class {XNAString} | R Documentation

## Create class which consists of XNAString objects given as a list

### Description

Create class which consists of XNAString objects given as a list

Create XNAStringSet object

Define show method

Method to extract a row/rows (either by row index or by 'name' slot) XNAStringSet object is returned.

Method to extract a single row (either by row index or by 'name' slot) XNAString object is returned.

Method to add/replace a single row (either by row index or by 'name' slot) XNAStringSet object is returned.

### Usage

    XNAStringSet(
      objects = NA,
      base = NA,
      sugar = NA,
      backbone = NA,
      target = NA,
      name = NA,
      conjugate3 = NA,
      conjugate5 = NA,
      col.base = "base",
      col.sugar = "sugar",
      col.backbone = "backbone",
      col.target = "target",
      col.conjugate3 = "conjugate3",
      col.conjugate5 = "conjugate5",
      col.name = "name",
      default_sugar = NA,
      default_backbone = NA,
      compl_dict = complementary_bases
    )

    ## S4 method for signature 'XNAStringSet'
    show(object)

    ## S4 method for signature 'XNAStringSet,ANY,ANY,ANY'
    x[i]

    ## S4 method for signature 'XNAStringSet,ANY,ANY'
    x[[i]]

    ## S4 replacement method for signature 'XNAStringSet,ANY,ANY'
    x[[i]] <- value

### Arguments

`objects` | list of XNAString objects
`base` | string (or character), RNAString, RNAStringSet, DNAString or DNAStringSet. In use only when objects argument is empty.
`sugar` | string (or character). In use only when objects argument is empty.
`backbone` | string (or character). In use only when objects argument is empty.
`target` | DNAStringSet, DNAString or character. In use only when objects argument is empty.
`name` | string (or character). In use only when objects argument is empty.
`conjugate3` | string (or character). In use only when objects argument is empty.
`conjugate5` | string (or character). In use only when objects argument is empty.
`col.base` | character (name of base column). In use only when objects argument is empty.
`col.sugar` | character (name of sugar column). In use only when objects argument is empty.
`col.backbone` | character (name of backbone column). In use only when o bjects argument is empty.
`col.target` | character (name of target column). In use only when objects argument is empty.
`col.conjugate3` | character (name of target column). In use only when objects argument is empty.
`col.conjugate5` | character (name of target column). In use only when objects argument is empty.
`col.name` | character (name of target column). In use only when objects argument is empty.
`default_sugar` | character - only one letter. Will be replicated nchar(base) times. In use only when objects argument is empty.
`default_backbone` | character - only one letter. Will be replicated nchar(base)-1 times. In use only when objects argument is empty.
`compl_dict` | data.table with following columns: "base", "target". By default internal XNAString dictionary is used. In use only when objects argument is empty.
`object` | XNAStringSet object
`x` | XNAStringSet object
`i` | numeric, integer, character, logical - filter needed for extraction method
`value` | XNAString object

### Value

XNASTringSet object

### Author(s)

Anna Gorska

### Examples

    my_dic <- data.table::data.table(
      type = c(
        rep("base", 3),
        rep("sugar", 2),
        rep("backbone", 3)
      ),
      symbol = c("G", "E", "A", "F", "O", "S", "B", "X")
    )
    obj1 <- XNAString(
      name = "a",
      base = "GGE",
      sugar = "FFO",
      backbone = "SB",
      dictionary = my_dic
    )
    obj2 <- XNAString(
      name = "b",
      base = "GGE",
      sugar = "FFO",
      dictionary = my_dic
    )
    obj3 <- XNAString(
      name = "b",
      base = c("GGE", "EEE"),
      sugar = c("FFO", "OOO"),
      dictionary = my_dic
    )
    XNAStringSetObj <- XNAStringSet(objects = list(obj1, obj2, obj3))

[Package XNAString version 1.2.2 Index]