GenerateDistributions {scSpatialSIM} | R Documentation |
Generate Characteristic Distributions of Cells
Description
Generate Characteristic Distributions of Cells
Usage
GenerateDistributions(
spatial_data,
positive_mean = 10,
negative_mean = 2,
positive_sd = 2,
negative_sd = 1
)
Arguments
spatial_data |
object of either class |
positive_mean , negative_mean |
number for mean of which to center the distribution of the positive and negative cell types. Can be single number of vector with length matching number of Cells. |
positive_sd , negative_sd |
number for the standard deviation around the positive cell type mean. Can be single value or same length as number of Cells. |
Value
object with a class that is the same as input spatial_data
with new columns containing distributions for positive/negative assigned cells
Examples
#create simulation object
spatial_data = CreateSimulationObject(sims = 1, cell_types = 1) %>%
#produce the point pattern
GenerateSpatialPattern() %>%
#make tissues
GenerateTissue(density_heatmap = FALSE, step_size = 0.1, cores = 1) %>%
#create positive and negative cells
GenerateCellPositivity(k = 4, sdmin = 3, sdmax = 5,
density_heatmap = FALSE, step_size = 1, cores = 1, probs = c(0.0, 0.1), shift = 0) %>%
#convert to a list of spatial data frames
CreateSpatialList(single_df = FALSE)
spat_data_distribution = GenerateDistributions(spatial_data)
[Package scSpatialSIM version 0.1.3.3 Index]