Generate diagnostic plots for cell annotation.
Source:R/cell_annotation.R
cell_annotation_diagnostic_plots_fn.Rd
Three list and character vector columns are added to cell_annotation
:
score_heatmaps
: heatmaps of per-cell label scores created for each clustering (as column annotation) (details). Generated bySingleR::plotScoreHeatmap()
marker_heatmaps
:NULL
ifcell_annotation$train_params$de
is not"de"
, otherwise heatmap for each label containing top upregulated markers from pairwise t-tests (details). Number of top markers is specified incell_annotation$diagnostics_params$heatmap_n_top_markers
delta_distribution_plot
: violin plots (in one figure / object) of per-cell deltas for each label. Deltas are differences between the score for the assigned label and the median across all labels for each cell (details)
Columns with output PDF files are named as score_heatmaps_out_file
etc.
Usage
cell_annotation_diagnostic_plots_fn(
cell_annotation,
cell_data,
sce,
base_out_dir,
do_heatmaps = FALSE,
cluster_cols_regex = "^cluster_"
)
Arguments
- cell_annotation
(input target) A
tibble
.- cell_data
(input target) A
DataFrame
.- sce
A
SingleCellExperiment
object.- base_out_dir
A character scalar: path to output directory under which will be for each reference dataset its diagnostic plots saved in.
- do_heatmaps
A logical scalar: if
TRUE
, generate score heatmaps.- cluster_cols_regex
A character scalar: regex to match columns in
colData()
with cluster labels. Those columns will be used in annotation score heatmaps.