Description Usage Arguments Value See Also Examples
trainingData
subsets the aggregate data of a ModifierML
object
to positions as defined by coord
. Positions with an entry in the
mod
column are labeled TRUE
.
1 2 3 4 5 6 7 | trainingData(x, coord, ...)
## S4 method for signature 'ModifierML,GRanges'
trainingData(x, coord, ...)
## S4 method for signature 'ModifierML,GRangesList'
trainingData(x, coord, ...)
|
x |
a |
coord |
a |
... |
See |
a CompressedSplitDataFrameList
with aggregate data and an
addition label column.
For more details have a look at
subsetByCoord
.
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 | data("dmod",package = "RNAmodR.ML")
setClass("ModMLExample",
contains = c("RNAModifierML"),
prototype = list(mod = c("D"),
score = "score",
dataType = c("PileupSequenceData",
"CoverageSequenceData"),
mlModel = character(0)))
data("me",package = "RNAmodR.ML")
nextUPos <- function(gr){
nextU <- lapply(seq.int(1L,2L),
function(i){
subseq <- subseq(RNAmodR::sequences(me)[dmod$Parent], start(dmod)+3L)
pos <- start(dmod) + 2L +
vapply(strsplit(as.character(subseq),""),
function(y){which(y == "U")[i]},integer(1))
ans <- dmod
ranges(ans) <- IRanges(start = pos, width = 1L)
ans
})
nextU <- do.call(c,nextU)
nextU$mod <- NULL
unique(nextU)
}
nondmod <- nextUPos(dmod)
nondmod <- nondmod[!(nondmod %in% dmod)]
coord <- unique(c(dmod,nondmod))
coord <- coord[order(as.integer(coord$Parent))]
trainingData(me,coord)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.