plot_density: Density ridges for two sets

View source: R/utils_plotting.R

plot_densityR Documentation

Density ridges for two sets

Description

Compare densities between each batch both before and after correction

Usage

plot_density(
  uncorrected,
  corrected,
  markers = NULL,
  filename = NULL,
  y = "batch",
  xlims = c(-1, 10),
  dataset_names = NULL,
  ncol = 6,
  format = 1
)

Arguments

uncorrected

tibble with uncorrected data

corrected

tibble with corrected data

markers

Character vector with the markers to plot

filename

Output figure filename. If NULL plots are returned

y

The column to stack densities with. Default: "batch". If set to "Type", the dataset_names will be used to stack densities.

xlims

The limits of the x axis as a vector

dataset_names

Change the names of the datasets from Uncorrected and Corrected to something else. Format: c("Uncorrected", "Corrected")

ncol

Number of density plots in a single row of plots. Default: 6

format

Plotting format (1 = 1 row per batch, 2 = all batches in same row.)

See Also

Other plot: plot_dimred_full(), plot_dimred(), plot_save_four(), plot_save_two(), plot_umap_labels()

Examples

## Not run: 
plot_density(uncorrected, corrected, y = 'batch', filename = 'my/dir/batchcor_plot.pdf')
plot_density(imputed1, imputed2, y = 'Type', dataset_names = paste('Panel', 1:2),
             filename = 'my/dir/merging_plot.pdf')

## End(Not run)

shdam/cyCombine documentation built on June 12, 2022, 11:29 p.m.