plotMethylationDataCoverage {DMRcaller} | R Documentation

## Plot methylation data coverage

### Description

This function plots the coverage for the bisulfite sequencing data.

### Usage

    plotMethylationDataCoverage(methylationData1, methylationData2 = NULL, breaks,
      regions = NULL, conditionsNames = NULL, context = "CG",
      proportion = TRUE, labels = NULL, col = NULL, pch = c(1, 0, 16, 2, 15,
      17), lty = c(4, 1, 3, 2, 6, 5), contextPerRow = FALSE)

### Arguments

`methylationData1` | the methylation data in condition 1 (see `methylationDataList`).
`methylationData2` | the methylation data in condition 2 (see `methylationDataList`). This is optional.
`breaks` | a `numeric` vector specifing the different values for the thresholds when computing the coverage.
`regions` | a `GRanges` object with the regions where to compute the coverage. If `NULL`, the coverage is computed genome-wide.
`conditionsNames` | a vector of character with the names of the conditions for `methylationData1` and `methylationData2`.
`context` | the context in which the DMRs are computed (`"CG"`, `"CHG"` or `"CHH"`).
`proportion` | a `logical` value indicating whether proportion or counts will be plotted.
`labels` | a `vector` of `character` used to add a subfigure character to the plot. If `NULL` nothing is added.
`col` | a `character` vector with the colors. It needs to contain a minimum of 2 colors per condition. If not or if `NULL`, the defalut colors will be used.
`pch` | the R symbols used to plot the data. It needs to contain a minimum of 2 symbols per condition. If not or if `NULL`, the defalut symbols will be used.
`lty` | the line types used to plot the data. It needs to contain a minimum of 2 line types per condition. If not or if `NULL`, the defalut line types will be used.
`contextPerRow` | a `logical` value indicating if the each row represents an individual context. If `FALSE`, each column will represent an individual context.

### Details

This function plots the proportion of cytosines in a specific context that have at least a certain number of reads (x-axis)

### Value

Invisibly returns `NULL`

### Author(s)

Nicolae Radu Zabet

### See Also

`computeMethylationDataCoverage`, `methylationDataList`

### Examples

    # load the methylation data
    data(methylationDataList)

    # plot the coverage in CG context
    par(mar=c(4, 4, 3, 1)+0.1)
    plotMethylationDataCoverage(methylationDataList[["WT"]],
                               methylationDataList[["met1-3"]],
                               breaks = c(1,5,10,15), regions = NULL,
                               conditionsNames = c("WT","met1-3"),
                               context = c("CG"), proportion = TRUE,
                               labels = LETTERS, col = NULL,
                               pch = c(1,0,16,2,15,17), lty = c(4,1,3,2,6,5),
                               contextPerRow = FALSE)

    ## Not run:
    # plot the coverage in all three contexts
    plotMethylationDataCoverage(methylationDataList[["WT"]],
                               methylationDataList[["met1-3"]],
                               breaks = 1:15, regions = NULL,
                               conditionsNames = c("WT","met1-3"),
                               context = c("CG", "CHG", "CHH"),
                               proportion = TRUE, labels = LETTERS, col = NULL,
                               pch = c(1,0,16,2,15,17), lty = c(4,1,3,2,6,5),
                               contextPerRow = FALSE)

    ## End(Not run)

[Package DMRcaller version 1.16.0 Index]