getBasePairing: Accessing Dot Bracket annotation

Description Usage Arguments Value Examples

Description

getBasePairing converts a dot bracket annotation from a DotBracketString into a base pair table as DotBracketDataFrame. Base pairing is indicated by corresponding numbers in the forward and reverse columns.

getDotBracket converts the dot bracket annotation from a DotBracketDataFrame into a DotBracketString. If the character colums is populated, the information from this column will be used. If this is not desired set force = TRUE. However , beaware that this will result in a dot bracket annotation, which does not necessarilly matches the original dot bracket string it may have been created from. It is rather the dot bracket string with the lowest number of different loops and it will use the different dot bracket annotations one after another. Example: "(((<<<>>>)))" will be returned as (((((()))))). (((<<<)))>>> will be returned as (((<<<)))>>>, ((([[[)))]]] will be eturned as (((<<<)))>>>.

getLoopIndices converts the dot bracket annotation from a DotBracketString or DotBracketDataFrame into a LoopIndexList.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
getBasePairing(x, compress = TRUE, return.sequence = FALSE)

getDotBracket(x, force = FALSE)

getLoopIndices(x, bracket.type, warn.type.drops = TRUE)

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

## S4 method for signature 'DotBracketStringSet'
getBasePairing(x, compress = TRUE)

## S4 method for signature 'DotBracketDataFrame'
getDotBracket(x, force = FALSE)

## S4 method for signature 'DotBracketDataFrameList'
getDotBracket(x, force = FALSE)

## S4 method for signature 'SimpleSplitDotBracketDataFrameList'
getDotBracket(x, force = FALSE)

## S4 method for signature 'CompressedSplitDotBracketDataFrameList'
getDotBracket(x, force = FALSE)

## S4 method for signature 'DotBracketString'
getLoopIndices(x, bracket.type, warn.type.drops = TRUE)

## S4 method for signature 'DotBracketStringSet'
getLoopIndices(x, bracket.type, warn.type.drops = TRUE)

## S4 method for signature 'DotBracketDataFrame'
getLoopIndices(x, bracket.type, warn.type.drops = TRUE)

## S4 method for signature 'DotBracketDataFrameList'
getLoopIndices(x, bracket.type, warn.type.drops = TRUE)

## S4 method for signature 'SimpleSplitDotBracketDataFrameList'
getLoopIndices(x, bracket.type, warn.type.drops = TRUE)

## S4 method for signature 'CompressedSplitDotBracketDataFrameList'
getLoopIndices(x, bracket.type, warn.type.drops = TRUE)

Arguments

x

a DotBracketString or DotBracketStringSet object

compress

getBasePairing: whether to return a CompressedSplitDotBracketDataFrameList or a SimpleSplitDotBracketDataFrameList

return.sequence

if the input is a StructuredXStringSet: TRUE(default) or FALSE: Whether the sequence should be returned in the base column.

force

getDotBracket: Should the dot bracket string be generated from the base pairing, if the character column is present?

bracket.type

getLoopIndices: Which dot bracket annotation type should be converted into loop indices? Only usable, if more than one is present. (1L = '()', 2L = '<>', 3L = '[]', 4L = '{}')

warn.type.drops

getLoopIndices: TRUE(default) or FALSE: Warn if more than one dot bracket annotation type is present in the input?

Value

getBasePairing: The result is a DotBracketDataFrame with following columns: pos, forward, reverse, character (and optionally the base column). If a position is unpaired, forward and reverse will be 0, otherwise it will match the base paired positions.

getLoopIndices: returns a LoopIndexList.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data("dbs", package = "Structstrings")
# conversion
dbdf <- getBasePairing(dbs)
# ... and the round trip
dbs <- getDotBracket(dbdf)

# loop indices per bracket type
loopids <- getLoopIndices(dbs)
# choose the bracket type manually, if necessary
loopids <- getLoopIndices(dbs, bracket.type = 1L)
# do not show warning if mulitple bracket types are present
loopids <- getLoopIndices(dbs, bracket.type = 1L, warn.type.drops = FALSE)

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