plotData {RNAmodR} | R Documentation

## Visualizing data data from a `SequenceData`, `SequenceDataSet`, `SequenceDataList`, `Modifier` or `ModifierSet` object.

### Description

With the `plotData` and `plotDataByCoord` functions data from a `SequenceData`, `SequenceDataSet`, `SequenceDataList`, `Modifier` or `ModifierSet` object can be visualized.

Internally the functionality of the `Gviz` package is used. For each `SequenceData` and `Modifier` class the `getDataTrack` is implemented returning a `DataTrack` object from the `Gviz` package.

Positions to be visualized are selected by defining a genomic coordinate, for which `x` has to contain data.

### Usage

    plotData(x, name, from = 1L, to = 30L, type, ...)

    plotDataByCoord(x, coord, type, window.size = 15L, ...)

    getDataTrack(x, name, ...)

    ## S4 method for signature 'Modifier,GRanges'
    plotDataByCoord(x, coord, type = NA, window.size = 15L, ...)

    ## S4 method for signature 'Modifier'
    plotData(
      x,
      name,
      from,
      to,
      type = NA,
      showSequenceData = FALSE,
      showSequence = TRUE,
      showAnnotation = FALSE,
      ...
    )

    ## S4 method for signature 'Modifier'
    getDataTrack(x, name = name, ...)

    ## S4 method for signature 'ModifierSet,GRanges'
    plotDataByCoord(x, coord, type = NA, window.size = 15L, ...)

    ## S4 method for signature 'ModifierSet'
    plotData(
      x,
      name,
      from,
      to,
      type = NA,
      showSequenceData = FALSE,
      showSequence = TRUE,
      showAnnotation = FALSE,
      ...
    )

    ## S4 method for signature 'SequenceData,GRanges'
    plotDataByCoord(x, coord, type = NA, window.size = 15L, ...)

    ## S4 method for signature 'SequenceData'
    plotData(
      x,
      name,
      from,
      to,
      perTranscript = FALSE,
      showSequence = TRUE,
      showAnnotation = FALSE,
      ...
    )

    ## S4 method for signature 'SequenceData'
    getDataTrack(x, name = name, ...)

    ## S4 method for signature 'SequenceDataList'
    getDataTrack(x, name = name, ...)

    ## S4 method for signature 'SequenceDataList,GRanges'
    plotDataByCoord(x, coord, type = NA, window.size = 15L, ...)

    ## S4 method for signature 'SequenceDataList'
    plotData(
      x,
      name,
      from,
      to,
      perTranscript = FALSE,
      showSequence = TRUE,
      showAnnotation = FALSE,
      ...
    )

    ## S4 method for signature 'SequenceDataSet'
    getDataTrack(x, name = name, ...)

    ## S4 method for signature 'SequenceDataSet,GRanges'
    plotDataByCoord(x, coord, type = NA, window.size = 15L, ...)

    ## S4 method for signature 'SequenceDataSet'
    plotData(
      x,
      name,
      from,
      to,
      perTranscript = FALSE,
      showSequence = TRUE,
      showAnnotation = FALSE,
      ...
    )

### Arguments

`x` | a `SequenceData`, `SequenceDataSet`, `SequenceDataList`, `Modifier` or `ModifierSet` object.
`name` | Only for `plotData`: the transcript name
`from` | Only for `plotData`: start position
`to` | Only for `plotData`: end position
`type` | the data type of data show as data tracks.
`...` | optional parameters: `modified.seq` `TRUE` or `FALSE`. Should the sequence shown with modified nucleotide positions? (default: `modified.seq = FALSE`) `additional.mod` other modifications, which should be shown in the annotation and sequence track. The must be a `GRanges` compatible with `combineIntoModstrings`. `annotation.track.pars` Parameters passed onto the `AnnotationTrack`. `sequence.track.pars` Parameters passed onto the `SequenceTrack`.
`coord` | coordinates of a positions to subset to as a `GRanges` object. The 'Parent' column is expected to match the transcript name.
`window.size` | integer value for the number of positions on the left and right site of the selected positions included in the plotting (default: `window.size = 15L`)
`showSequenceData` | `TRUE` or `FALSE`: should the sequence data be shown? (default: `seqdata = FALSE`)
`showSequence` | `TRUE` or `FALSE`: should a sequence track be shown? (default: `seqdata = TRUE`)
`showAnnotation` | `TRUE` or `FALSE`: should a annotation track be shown? (default: `seqdata = FALSE`)
`perTranscript` | `TRUE` or `FALSE`: Should the positions shown per transcript? (default: `perTranscript = FALSE`)

### Value

a plot send to the active graphic device

### Examples

    data(msi,package="RNAmodR")
    plotData(msi[[1]], "2", from = 10L, to = 45L)
    ## Not run:
    plotData(msi, "2", from = 10L, to = 45L)

    ## End(Not run)

[Package RNAmodR version 1.1.15 Index]