getBasePairing | R Documentation |
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
.
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)
x |
a |
compress |
|
return.sequence |
if the input is a |
force |
|
bracket.type |
|
warn.type.drops |
|
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
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.