Description Usage Arguments Value Examples
View source: R/clustering_plots.R
'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.
1 2 | mutate_colors(condition_composition, color_for_condition,
null_color = "gray", threshold_percent = 50)
|
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 |
A data frame containing statistics of XINA network centrality scores
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.