Skip to contents

Plot violin of per-gene mean diversity by sample type

Usage

plot_mean_violin(se, assay_name = "diversity", sample_type_col = NULL)

Arguments

se

A `SummarizedExperiment` returned by `calculate_diversity`.

assay_name

Name of the assay to use (default: "diversity").

sample_type_col

Optional column name in `colData(se)` containing sample types.

Value

A `ggplot` violin plot object.

Examples

data("tcga_brca_luma", package = "TSENAT")
rc <- as.matrix(tcga_brca_luma[1:100, -1, drop = FALSE])
gs <- tcga_brca_luma[1:100, 1]
se <- calculate_diversity(rc, gs, q = 0.1, norm = FALSE)
plot_mean_violin(se)