plotEmpiricalDistribution {dmrseq} | R Documentation |
Uses ggplot2 to plot smoothed density histograms of methylation
proportions (beta values), or 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.
Default value is FALSE (so samples with the same value of
|
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")