DotBracketString: The DotBracketString, DotBracketStringSet and...

View source: R/Structstrings-DotBracketString.R

DotBracketStringR Documentation

The DotBracketString, DotBracketStringSet and DotBracketStringSetList classes

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

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

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

FelixErnst/Structstrings documentation built on Nov. 6, 2024, 12:11 a.m.