DotBracketString: The DotBracketString, DotBracketStringSet and...

Description Usage Arguments Value Examples

View source: R/Structstrings-DotBracketString.R

Description

The DotBracketString extends the BString class. The DotBracketStringSet and DotBracketStringSetList classes are implemented accordingly.

The alphabet consists of the letters (, ), ., <, >, [, ], { and }, which describes base pairing between positions. The . letter describes an unpaired position. The number of opening and closing letters need to be equal within a DotBracketString to be a valid dot bracket annotation. This is checked upon creation and modificiation of the object.

The objects can also be created using the shorter function names DB, DBS and DBSL.

Currently, there is no distinction in base pairing strength between the different bracket types.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
DotBracketString(x = "", start = 1, nchar = NA)

DB(x = character(), start = 1, nchar = NA)

DotBracketStringSet(x = character())

DBS(x = character())

DotBracketStringSetList(..., use.names = TRUE)

DBSL(..., use.names = TRUE)

## S4 method for signature 'DotBracketString'
alphabet(x)

## S4 method for signature 'DotBracketString'
encoding(x)

Arguments

x

DotBracketString,DotBracketStringSet: the input, which is tried to be convert into a DotBracketString*.

start

DotBracketString: starting position for creating the object from the character input.

nchar

DotBracketString: number of letters are read from the input character

...

DotBracketStringSetList: the input, which converted into a list. Each element is tried to be converted into a DotBracketStringSet.

use.names

DotBracketStringSetList: Should names of the input be preserved.

Value

a DotBracketString* object.

Examples

1
2
3
4
str <- "((.))..[[..]]...{{..}}..<<..>>"
db <- DotBracketString(str)
dbs <- DotBracketStringSet(c("structure1" = str, "structure2" = str))
dbsl <- DotBracketStringSetList(list(first = dbs, second = dbs))

Structstrings documentation built on Dec. 11, 2020, 2:01 a.m.