convertAnnotation: Convert between dot bracket annotations

convertAnnotationR Documentation

Convert between dot bracket annotations

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

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

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

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