View source: R/plot_results_distributions.R
plot_results_distributions | R Documentation |
Plot the distributions of the test statistics in the phenotype-cell type association results.
plot_results_distributions(
results = load_example_results(),
x_var = "estimate",
facets = "CellType",
binwidth = NULL,
scales = "fixed",
log10_transform = TRUE,
show_plot = TRUE,
save_path = NULL,
...
)
results |
The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results |
x_var |
Variable to plot on the x-axis. |
facets |
A set of variables or expressions quoted by For compatibility with the classic interface, can also be a
formula or character vector. Use either a one sided formula, |
binwidth |
The width of the bins. Can be specified as a numeric value
or as a function that calculates width from unscaled x. Here, "unscaled x"
refers to the original x values in the data, before application of any
scale transformation. When specifying a function along with a grouping
structure, the function will be called once per group.
The default is to use the number of bins in The bin width of a date variable is the number of days in each time; the bin width of a time variable is the number of seconds. |
scales |
Should scales be fixed ( |
log10_transform |
log10 transform |
show_plot |
Print the plot to the console. |
save_path |
Save the plot to a file.
Set to |
... |
Arguments passed on to
|
results <- load_example_results()
ct <- unique(results$CellType)[seq(9)]
results <- results[CellType %in% ct]
results[,estimate_scaled:=scales::rescale(estimate,c(1,5))]
out <- plot_results_distributions(results, x_var="estimate_scaled")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.