plot_condition_compositions: plot_condition_compositions

Description Usage Arguments Value Examples

View source: R/clustering_plots.R

Description

computes condition composition of the XINA clustering results and draws pie-charts.

Usage

1
2
plot_condition_compositions(clustering_result, bullseye = FALSE,
  ggplot_theme = NULL)

Arguments

clustering_result

A list containing XINA clustering results. See xina_clustering

bullseye

If it is TRUE, draw bullseye plot instead of the pie-chart. Default is FALSE

ggplot_theme

This is ggplot theme to modify condition composition pie-chart and bulles eye plots.

Value

A condition composition plot and a data frame containing condition compositions of the clusters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# load XINA example data
data(xina_example)

# Plot condition composition pie-chart with default option
plot_condition_compositions(example_clusters)

# Make a new color code for conditions
condition_colors <- c("tomato","steelblue1","gold")
names(condition_colors) <- example_clusters$condition
example_clusters$color_for_condition <- condition_colors

# Draw condition composition pie-chart with the new color code
plot_condition_compositions(example_clusters)

# Draw condition composition bullseye plot
plot_condition_compositions(example_clusters, bullseye = TRUE)

XINA documentation built on Nov. 8, 2020, 5:32 p.m.