plotting {methimpute} | R Documentation

## Methimpute plotting functions

### Description

This page provides an overview of all methimpute plotting functions.

### Usage

    plotHistogram(model, total.counts, binwidth = 1)

    plotScatter(model, datapoints = 1000)

    plotTransitionProbs(model)

    plotConvergence(model)

    plotEnrichment(model, annotation, windowsize = 100, insidewindows = 20,
      range = 1000, category.column = NULL, plot = TRUE,
      df.list = NULL)

    plotPosteriorDistance(model, datapoints = 1e+06, binwidth = 5,
      max.coverage.y = 0, min.coverage.x = 3, xmax = 200,
      xbreaks.interval = xmax/10, cutoffs = NULL)

### Arguments

`model` | A `methimputeBinomialHMM` object.
`total.counts` | The number of total counts for which the histogram is to be plotted.
`binwidth` | The bin width for the histogram/boxplot.
`datapoints` | The number of randomly selected datapoints for the plot.
`annotation` | A `GRanges-class` object with coordinates for the annotation.
`windowsize` | Resolution in base-pairs for the curve upstream and downstream of the annotation.
`insidewindows` | Number of data points for the curve inside the annotation.
`range` | Distance upstream and downstream for which the enrichment profile is calculated.
`category.column` | The name of a column in `data` that will be used for facetting of the plot.
`plot` | Logical indicating whether a plot or the underlying data.frame is to be returned.
`df.list` | A list() of data.frames, output from `plotEnrichment(..., plot=FALSE)`. If specified, option `data` will be ignored.
`max.coverage.y` | Maximum coverage for positions on the y-axis.
`min.coverage.x` | Minimum coverage for positions on the x-axis.
`xmax` | Upper limit for the x-axis.
`xbreaks.interval` | Interval for breaks on the x-axis.
`cutoffs` | A vector with values that are plotted as horizontal lines. The names of the vector must match the context levels in `data$context`.

### Value

A `ggplot` object.

### Functions

- `plotHistogram`: Plot a histogram of count values and fitted distributions.

- `plotScatter`: Plot a scatter plot of read counts colored by methylation status.

- `plotTransitionProbs`: Plot a heatmap of transition probabilities.

- `plotConvergence`: Plot the convergence of the probability parameters.

- `plotEnrichment`: Plot an enrichment profile around an annotation.

- `plotPosteriorDistance`: Maximum posterior vs. distance to nearest covered cytosine.

### Examples

    ## Get some toy data
    file <- system.file("data","arabidopsis_toydata.RData",
                        package="methimpute")
    data <- get(load(file))
    print(data)
    model <- callMethylation(data)
    ## Make nice plots
    plotHistogram(model, total.counts=5)
    plotScatter(model)
    plotTransitionProbs(model)
    plotConvergence(model)
    plotPosteriorDistance(model$data)

    ## Get annotation data and make an enrichment profile
    # Note that this looks a bit ugly because our toy data
    # has only 200000 datapoints.
    data(arabidopsis_genes)
    plotEnrichment(model, annotation=arabidopsis_genes)

[Package methimpute version 1.9.0 Index]