mutate_colors: mutate_colors

Description Usage Arguments Value Examples

View source: R/clustering_plots.R

Description

'mutate_colors' generates new color scheme for XINA clustering plot based on condition composition results (plot_condition_compositions). If any clusters have higher percentage than the 'threshold_percent', XINA will assign new colors in accordance to 'color_for_condition'. If not, XINA will give 'gray' color or user-defined color via 'null_color' parameter.

Usage

1
2
mutate_colors(condition_composition, color_for_condition,
  null_color = "gray", threshold_percent = 50)

Arguments

condition_composition

A data frame generated by plot_condition_compositions

color_for_condition

A vector like 'color_for_condition' of xina_clustering

null_color

Default is 'gray'. This color is for clusters that are not biased to any of experimental conditions

threshold_percent

Default is 50. The percentage threshold for giving new colors

Value

A data frame containing statistics of XINA network centrality scores

Examples

1
2
3
4
5
6
7
8
# load XINA example data
data(xina_example)

# Plot condition composition pie-chart with default option
condition_composition <- plot_condition_compositions(example_clusters)
example_clusters$color_for_clusters <- mutate_colors(condition_composition,
example_clusters$color_for_condition)
plot_clusters(example_clusters, xval=c(0,2,6,12,24,48,72), xylab=FALSE)

langholee/XINA documentation built on March 17, 2020, 5:23 p.m.