plotMethDistribution: Plots the distribution of methylation on the genome.

Description Usage Arguments Details Value Author(s) See Also

View source: R/plotGenomicDistributions.R

Description

Plots the distribution of methylation (as defined in an alignmentMeth object upon the genome.

Usage

1
2
plotMethDistribution(meth, samples, bw = 1e-3, subtract, chrs, centromeres,
add = FALSE, col, ylim = NULL, legend = TRUE, ...)

Arguments

meth

An object of class alignmentMeth containing the methylation data.

samples

A numeric vector defining the columns of data in the ‘meth’ object from which to estimate proportions of methylation, or a list object containing numeric vectors if multiple distributions are to be derived from the ‘meth’ object, or a factor in which each level of the factor defines a set of columns for the ‘meth’ object. If missing, derived from the ‘@replicates’ slot of the ‘meth’ object.

bw

Gives the bandwidth of the density plots; analagous to the ‘bw’ parameter in density.

subtract

A numeric vector giving values to be subtracted from the density of methylation. See Details.

chrs

The names of the chromosomes for which a distribution should be plotted. If mising, derived from the ‘@alignments’ slot of the ‘meth’ object.

centromeres

If given, a numeric vector defining the position of the centromeres on the chromosomes. These will be then be plotted.

add

Should the distribution curve be added to an existing plot? Defaults to FALSE.

col

A vector of colours to be used to plot the distributions. If missing, generated from rainbow.

ylim

Limits on the y-axis. Defaults to NULL, in which case limits are automatically set.

legend

Should a legend be added to the plot? Defaults to TRUE.

...

Any additional parameters to be passed to plot.

Details

The function returns the density of methylation calculated. This can be used in further plots as the 'subtract' parameter, which allows one methylation profile to be subtracted from another.

Value

An object of class density describing the plotted distribution.

Author(s)

Thomas J. Hardcastle

See Also

alignmentMeth


segmentSeq documentation built on Nov. 8, 2020, 5:18 p.m.