visHist {CellMixS} | R Documentation

## visHist

### Description

Plot pvalue histograms of metric score distributions

### Usage

    visHist(res_object, metric_prefix = "cms", n_col = 1)

### 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_prefix` | Character. Prefix to specify names of `colData(sce)` to be plotted. Applys only if 'res_object' is a `SingleCellExperiment` object. Default is 'cms'.
`n_col` | Numeric. Number of columns of the pval histogram.

### 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 'metric_prefix'.

### Value

a `ggplot` object.

### See Also

Other visualize metric functions: `visMetric`, `visOverview`

### Examples

    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)

[Package CellMixS version 1.0.2 Index]