convertAnnotation: Convert between dot bracket annotations

Description Usage Arguments Value Examples

Description

convertAnnotation converts a type of dot bracket annotation into another. This only works if the original bracket type is present and the target bracket type is not.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
convertAnnotation(x, from, to)

## S4 method for signature 'DotBracketString'
convertAnnotation(x, from, to)

## S4 method for signature 'DotBracketStringSet'
convertAnnotation(x, from, to)

## S4 method for signature 'DotBracketStringSetList'
convertAnnotation(x, from, to)

Arguments

x

a DotBracketString, DotBracketStringSet or DotBracketStringSetList

from

which annotation type should be converted? Must be one of the following values: 1L = '()', 2L = '<>', 3L = '[]', 4L = '{}' and must be present in the input.

to

Into which annotation type should the selected one be converted? Must be one of the following values: 1L = '()', 2L = '<>', 3L = '[]', 4L = '{}'. Must not be present in the input.

Value

The modified input object, a DotBracketString* object.

Examples

1
2
3
str <- "((.))..[[..]]...{{..}}......."
dbs <- DotBracketString(str)
convertAnnotation(dbs, 1L, 2L)

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