ModifierML-class: The ModifierML class

Description Usage Arguments Value Slots See Also Examples

Description

The ModifierML class is a virtual class, which provides the central functionality for searching with a machine learning models for patterns of post-transcriptional RNA modifications in high throughput sequencing data.

It extends the virtual Modifier class form the RNAmodR package and add the useMLModel function. If not called directly for a ModifierML class, the useMLModel will be called from the aggregate function.

The slot mlModel is added and serves a dual purpose. If mlModel is a character, a class of the type ModifierMLModel is created upon creation of a ModifierML object. However, for developing purposes the slot can also remain empty and a ModifierMLModel object can be set using the setMLModel function and retrieved using the getMLModel. If the mlModel slot is empty, the findMod setting will be set to FALSE and the ModifierML object will be returned just with the aggregate data. Such an object can then be used to train a machine learning model. The data can be accessed using trainingData.

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
setMLModel(x) <- value

getMLModel(x)

hasMLModel(x)

useMLModel(x)

## S4 replacement method for signature 'ModifierML'
setMLModel(x) <- value

## S4 method for signature 'ModifierML'
getMLModel(x)

## S4 method for signature 'ModifierML'
hasMLModel(x)

## S4 method for signature 'ModifierML'
aggregate(x, force = FALSE)

## S4 method for signature 'ModifierML'
useMLModel(x)

## S4 method for signature 'ModifierML'
modify(x, force = FALSE)

Arguments

x

a ModifierML object.

value

a ModifierMLModel object

force

whether to recreate the aggregated data, if it is already stored inside the Modifier object.

Value

a ModifierML object

Slots

mlModel

a character describing a class name for creating a ModifierMLModel object or a ModifierMLModel object itself. If mlModel is a character, the class will tried to be create by calling a function of the same name.

See Also

Modifier

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# an example implementation of a ModifierML object
setClass("ModMLExample",
         contains = c("RNAModifierML"),
         prototype = list(mod = c("D"),
                          score = "score",
                          dataType = c("PileupSequenceData",
                                       "CoverageSequenceData"),
                          mlModel = character(0)))
# constructor function for ModMLExample
ModMLExample <- function(x, annotation = NA, sequences = NA, seqinfo = NA,
                         ...){
  RNAmodR:::Modifier("ModMLExample", x = x, annotation = annotation,
                     sequences = sequences, seqinfo = seqinfo, ...)
}

FelixErnst/RNAmodR.ML documentation built on July 24, 2020, 1:34 a.m.