scmet_plot_volcano: Volcano plot for differential analysis

View source: R/utils_plots.R

scmet_plot_volcanoR Documentation

Volcano plot for differential analysis

Description

Function showing volcano plots for differential analysis. The posterior tail probabilities are ploteted on the y-axis, and depending on the differential test to plot the effect size will be plotted on the x-axis. For differential variability (DV) analysis we recommend using the epsilon parameter.

Usage

scmet_plot_volcano(
  diff_obj,
  task = "diff_epsilon",
  xlab = NULL,
  ylab = "Posterior tail probability",
  title = NULL,
  nfeatures = NULL
)

Arguments

diff_obj

The differential scMET object after calling the scmet_differential function.

task

The differential test to plot. For differential mean methylation: diff_mu that plots the LOR(mu_A, mu_B) on x-axis. For differential variability: either (1) diff_epsilon that plots the change (epsilon_A - epsilon_B), or (2) diff_gamma that plots the LOR(gamma_A, gamma_B) on x-axis.

xlab

Optional x-axis label.

ylab

Optional y-axis label.

title

Optional title, default NULL.

nfeatures

Optional parameter, denoting a subset of number of features to plot (only for non-differential features). Mostly to reduce over-plotting.

Value

A ggplot2 object.

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

See Also

scmet, scmet_differential, scmet_hvf_lvf, scmet_plot_mean_var, scmet_plot_vf_tail_prob, scmet_plot_efdr_efnr_grid, scmet_plot_ma

Examples

## Not run: 
# Fit scMET for each group
fit_A <- scmet(Y = scmet_diff_dt$scmet_dt_A$Y,
X = scmet_diff_dt$scmet_dt_A$X, L = 4, iter = 100, seed = 12)
fit_B <- scmet(Y = scmet_diff_dt$scmet_dt_B$Y,
X = scmet_diff_dt$scmet_dt_B$X, L = 4, iter = 100, seed = 12)

# Run differential test
diff_obj <- scmet_differential(obj_A = fit_A, obj_B = fit_B)
# Create volcano plot
scmet_plot_volcano(diff_obj, task = "diff_epsilon")

## End(Not run)


andreaskapou/scMET documentation built on Feb. 1, 2024, 10:46 a.m.