View source: R/plotEmpiricalDistribution.R
plotEmpiricalDistribution | R Documentation |
Uses ggplot2 to plot smoothed density histograms of methylation
proportions (beta values), or coverage. Methylation proportion densities
are weighted by coverage.
The number of curves plotted
will be equal to the number of different values of testCovariate
,
unless bySample
is TRUE. This can take quite some time to
execute for a large object, so it is recommended to first take a random
sample of loci (say one million) before plotting.
plotEmpiricalDistribution(
bs,
testCovariate = NULL,
bySample = FALSE,
type = "M",
adj = 2.5
)
bs |
a BSseq object |
testCovariate |
character specifying the column name of the
|
bySample |
logical whether to plot a separate line for each sample,
even if the grouping |
type |
a character indicating which type of density to plot - the methylation (beta) values ("M") or the coverage ("Cov"). Default is "M". |
adj |
a numeric value for the |
a ggplot object
data(BS.chr21)
# plot beta values by sample group
plotEmpiricalDistribution(BS.chr21, testCovariate="CellType")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.