visHist: visHist

Description Usage Arguments Details Value See Also Examples

View source: R/VisCms.R

Description

Plot pvalue histograms of metric score distributions

Usage

1
2
3
4
5
6
7
visHist(
  res_object,
  metric = "cms",
  prefix = TRUE,
  n_col = 1,
  metric_prefix = NULL
)

Arguments

res_object

SingleCellExperiment object, matrix or data.frame. The SingleCellExperiment object should contain the result scores (e.g. cms) to plot in colData(res_object). Matrix or data frame should have result scores in columns and cells in rows.

metric

Character vector. Specify names of colData(sce) to be plotted. Applys only if 'res_object' is a SingleCellExperiment object. Default is 'cms'. If prefix is TRUE all columns starting with 'metric' will be plotted.

prefix

Boolean. Is ‘metric' used to specify column’s prefix(true) or complete column names (False).

n_col

Numeric. Number of columns of the pval histogram.

metric_prefix

Former parameter to define prefix of the metric to be plotted. Will stop and ask for the new syntax.

Details

Plots metric score distribution similar to a pvalue histogram distribution. Without dataset-specific bias, cms scores should be approx. flat distributed. If 'res_object' is a matrix or data.frame, it will create a histogram for each column. If 'res_object' is a SingleCellExperiment object, it will create a histogram of all colData(res_object) that start with or are specified in 'metric'.

Value

a ggplot object.

See Also

Other visualize metric functions: visMetric(), visOverview()

Examples

1
2
3
4
5
library(SingleCellExperiment)
sim_list <- readRDS(system.file("extdata/sim50.rds", package = "CellMixS"))
sce <- sim_list[[1]][, c(1:50)]
sce_cms <- cms(sce, "batch", k = 20, n_dim = 2)
visHist(sce_cms)

CellMixS documentation built on Dec. 19, 2020, 2 a.m.