calc.cluster.averages | R Documentation |
Calculates the average of a metadata column (numeric) per cluster.
calc.cluster.averages(
col_name = "Score.GO.0006096",
plot.UMAP.too = TRUE,
return.plot = FALSE,
obj = combined.obj,
split_by = GetNamedClusteringRuns()[1],
scale.zscore = FALSE,
simplify = TRUE,
plotit = TRUE,
histogram = FALSE,
nbins = 50,
suffix = NULL,
stat = c("mean", "median")[2],
quantile.thr = 0.9,
absolute.thr = FALSE,
filter = c(FALSE, "above", "below")[1],
ylab.text = paste("Cluster", stat, "score"),
title = paste("Cluster", stat, col_name),
prefix.cl.names = FALSE,
report = TRUE,
subtitle = NULL,
width = 8,
height = 6,
...,
xlb = if (absolute.thr) {
paste("Threshold at", absolute.thr)
} else {
paste("Black lines: ", kppd(Stringendo::percentage_formatter(c(1 - quantile.thr,
quantile.thr))), "quantiles |", "Cl. >",
Stringendo::percentage_formatter(quantile.thr), "are highlighted. |", split_by)
},
fname = ppp(col_name, split_by, "cluster.average.barplot.pdf", ...)
)
col_name |
The name of the column for which the average is calculated. Default: 'Score.GO.0006096'. |
plot.UMAP.too |
Whether to plot a UMAP as well. Default: |
return.plot |
Whether to return the plot. Default: |
obj |
The main Seurat object used for calculations. Default: |
split_by |
Cluster to split by. Default: First entry of GetNamedClusteringRuns(). |
scale.zscore |
Whether to scale z-scores. Default: |
simplify |
Whether to simplify the result. Default: |
plotit |
Whether to plot the results. Default: |
histogram |
Whether to produce a histogram. Default: |
nbins |
The number of bins for the histogram. Default: 50. |
suffix |
Suffix added to the filename. Default: NULL. |
stat |
Statistical method applied, "mean" or "median". Default: "median". |
quantile.thr |
The threshold for quantiles. Default: 0.9. |
absolute.thr |
Absolute threshold used in computations. Default: |
filter |
The filter mode: 'above', 'below', or FALSE. Default: |
ylab.text |
Text for the y-axis label. Default: "Cluster" followed by the statistical method and "score". |
title |
Title for the plot. Default: "Cluster" followed by the statistical method and column name. |
subtitle |
The subtitle for the plot. Default: NULL. |
width |
The width of the plot. Default: 8. |
height |
The height of the plot. Default: 6. |
... |
Additional parameters passed to the internally called functions. |
xlb |
The label for the x-axis. Default depends on the 'absolute.thr' parameter. |
fname |
The filename for the plot. Default: based on column name and split_by value. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.