View source: R/multiple_background_images.R
multiple_background_images | R Documentation |
Generate a set of background images with different proportions of mixed cell types all at once. The default values for the arguments give an example of multiple image simulation which enable an automatic multiple image simulation without the specification of any argument.
multiple_background_images(
bg_sample = bg1,
idents = c("Tumour", "Immune", "Others"),
props = list(rep(0.1, 9), seq(0, 0.4, 0.05), seq(0.9, 0.5, -0.05)),
plot_image = TRUE,
plot_colours = NULL
)
bg_sample |
A data frame or |
idents |
String Vector. Names of the cell types to generate. |
props |
List. Each element is a vector of proportions of the corresponding cell type. The length of the vector is how many images to generate. All vectors should be of the same length, also equal to the number of images. |
plot_image |
Boolean. Whether plot the simulated images or not. Default is TRUE. |
plot_colours |
String Vector. If plot_image is TRUE, this param is the
corresponding colours for the |
A list of SPE objects
multiple_images_with_clusters
for simulating multiple
images with clusters, and multiple_images_with_immune_rings
for simulating multiple images with immune rings.
Other simulate multiple images functions:
multiple_images_with_clusters()
,
multiple_images_with_immune_rings()
idents <- c("Tumour","Immune","Others")
prop1 <- rep(0.1,9)
prop2 <- seq(0, 0.4, 0.05)
prop3 <- seq(0.9,0.5,-0.05)
set.seed(610)
bg_image_list <- multiple_background_images(bg_sample = bg1,
idents = idents, props = list(prop1, prop2, prop3), plot_image = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.