computeMethylationDataSpatialCorrelation: Compute methylation data spatial correlation

Description Usage Arguments Value Author(s) See Also Examples

View source: R/spatialCorrelation.R

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

1
2
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

1
2
3
4
5
6
7
# 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)

DMRcaller documentation built on Nov. 8, 2020, 5:26 p.m.