computeMethylationDataSpatialCorrelation {DMRcaller} | R Documentation

## Compute methylation data spatial correlation

### Description

This function computes the correlation of the methylation levels as a function of the distances between the Cytosines. The function returns a `vector` with the correlation of methylation levels at distance equal to a `vector` of specified thresholds.

### Usage

    computeMethylationDataSpatialCorrelation(methylationData, regions = NULL,
      context = "CG", distances = NULL)

### Arguments

`methylationData` | the methylation data stored as a `GRanges` object with four metadata columns (see `methylationDataList`).
`regions` | a `GRanges` object with the regions where to compute the correlation. If `NULL`, the correlation is computed genome-wide.
`context` | the context in which the correlation is computed (`"CG"`, `"CHG"` or `"CHH"`).
`distances` | a `numeric` vector specifing the different values for the distances when computing the correlation.

### Value

a `vector` with the correlation of the methylation levels for Cytosines located at distances specified in the `distances` `vector`.

### Author(s)

Nicolae Radu Zabet

### See Also

`plotMethylationDataSpatialCorrelation`, `methylationDataList`

### Examples

    # load the methylation data
    data(methylationDataList)

    # compute spatial correlation in CG context
    distances <- c(1,5,10,15)
    correlation_CG_wt <- computeMethylationDataSpatialCorrelation(methylationDataList[["WT"]],
                     context="CG", distances=distances)

[Package DMRcaller version 1.24.0 Index]