plot_density: Density Plot of beta-Values

Description Usage Arguments Value Examples

View source: R/scMethrix_plot.R

Description

Density Plot of β-Values

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_density(
  scm = NULL,
  assay = "score",
  regions = NULL,
  n_cpgs = 25000,
  pheno = NULL,
  col_palette = "RdYlGn",
  show_legend = TRUE,
  verbose = TRUE
)

Arguments

scm

scMethrix; the single cell methylation experiment

assay

string; name of an existing assay. Default = "score"

regions

Granges; genomic regions to be summarized. Could be a data.table with 3 columns (chr, start, end) or a GenomicRanges object

n_cpgs

integer; Use these many random CpGs for plotting. Default 25000. Set it to NULL to use all - which can be memory expensive. The seed will be set to n_cpgs for consistency.

pheno

string; Col name of colData(m). Will be used as a factor to color different groups

col_palette

string; Name of the RColorBrewer palette to use for plotting.

show_legend

boolean; Display the legend on the plot

verbose

boolean; Flag for outputting function status messages. Default = TRUE

Value

ggplot2 object

Examples

1
2
data('scMethrix_data')
plot_density(scm = scMethrix_data)

CompEpigen/scMethrix documentation built on Nov. 6, 2021, 3:09 p.m.