modify {RNAmodR} | R Documentation

## Searching for modifications in `SequenceData`

### Description

The `modify` function executes the search for modifications for a `Modifier` class. Usually this is done automatically during construction of a `Modifier` object.

When the `modify` functions is called, the aggregated data is checked for validity for the current settings and the search for modifications is performed using the `findMod`. The results are stored in the `modification` slot of the `Modifier` object, which is returned by `modify`. The results can be accessed via the `modifications()` function.

`findMod` returns the found modifications as a `GRanges` object and has to be implemented for each individual `Modifier` class.

### Usage

    modifications(x, ...)

    modify(x, ...)

    findMod(x)

    ## S4 method for signature 'Modifier'
    modifications(x, perTranscript = FALSE)

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

    ## S4 method for signature 'Modifier'
    findMod(x)

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

### Arguments

`x` | a `Modifier` object.
`...` | additional arguments
`perTranscript` | For `modifications>` `TRUE` or `FALSE`: Should the coordinates be returned as local per transcript coordinates?
`force` | force to run `aggregate` again, if data is already stored in `x`.

### Value

- `modify`: the updated `Modifier` object.

- `modifications`: the modifications found as a `GRanges` object.

### Examples

    data(msi,package="RNAmodR")
    # modify() triggers the search for modifications in the data contained in
    # the Modifier or ModifierSet object
    mi <- modify(msi[[1]])

[Package RNAmodR version 1.0.2 Index]