Description Usage Arguments Value Examples
Draw barplot of the "betas" from a decon fit
1 | TIL_barplot(mat, draw_legend = FALSE, main = "", col = NULL, ...)
|
mat |
Matrix of cell proportions or abundances, in the same dimensions output by spatialdecon (cells in rows, observations in columns). User is free to re-order columns/observations in whatever order is best for display. |
draw_legend |
Logical. If TRUE, the function draws a legend in a new plot frame. |
main |
Title for barplot |
col |
Vector of colors for cell types. Defaults to pre-set colors for the safeTME cell types. |
... |
Arguments passed to barplot() |
Draws a barplot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(mini_geomx_dataset)
data(safeTME)
# estimate background:
mini_geomx_dataset$bg <- derive_GeoMx_background(
norm = mini_geomx_dataset$normalized,
probepool = rep(1, nrow(mini_geomx_dataset$normalized)),
negnames = "NegProbe"
)
# run basic decon:
res0 <- spatialdecon(
norm = mini_geomx_dataset$normalized,
bg = mini_geomx_dataset$bg,
X = safeTME
)
# run barplot:
TIL_barplot(mat = res0$beta)
# run barplot and draw a color legend
TIL_barplot(mat = res0$beta, draw_legend = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.