Visualize_cometh: Co-methylation plot

View source: R/Visualize_cometh.R

Visualize_comethR Documentation

Co-methylation plot

Description

It visualizes co-methylation of a target probe with its neighbours with a HiC-like plot.

Usage

Visualize_cometh(
  annotation,
  CpG,
  distance,
  L_bound,
  R_bound,
  beta_mat,
  probe2exclude = NULL,
  max_y = 11
)

Arguments

annotation

A DNA methylation microarray annotation object. For example, getAnnotation(IlluminaHumanMethylation450kanno.ilmn12.hg19)

CpG

A CpG identifier (e.g. "cg15771735")

distance

A distance that defines the neighbourhood explored for co-methylation (e.g. pos ± distance)

L_bound

It allows to easily extend the number of CpGs on the left flank

R_bound

It allows to easily extend the number of CpGs on the right flank

beta_mat

A numeric matrix (CpGs as rows, samples as columns). We recommend to use M-values, though the function works fine with beta-values.

probe2exclude

A list of potentially artefactual probes. These will be coloured in purple on the comethylation plot.

max_y

It regulates the height of the co-methylation triangle. For more details, see help(plotHic, Sushi)

Details

Comethylation squared within the interval [0, 1] is visualized. Distance between probes \Delta\delta is also available on the plot.

Value

Graphics + vector. A vector of cg ids visualized in the co-methylation plot is returned.

Examples

res = Visualize_cometh(annotation = annotation, CpG = 'cg14911689', distance = 1000,
                       L_bound = 3, R_bound = 2, beta_mat = beta_value, max_y = 5)

BenjaminPlanterose/UMtools documentation built on Aug. 19, 2024, 4:54 a.m.