calc_assortment | R Documentation |
This functions calculates cell-wise and mean cell type segregation and assortment values as suggested by Yanni et al. (2019) Current Biology.
calc_assortment(object, r = 5, iter = NULL, n_simulations = 10)
object |
S4-object of type |
r |
Numeric. Maximum distance to to other cells to considered as neighbour. Refers to the surface-to-surface distance of cells. Unit: μm. |
iter |
Positive integer number of the simulation step/iteration at which the cell assortment should be calculated. If NULL, current distribution is displayed. |
n_simulations |
positive integer, specifying the number of permutations to be used to estimate the expected assortment if cell types are distributed randomly. |
Cell segregation and assortment is calculated as suggested by Yanni et al. (2019) Current Biology.
A list with three elements: 'cells' is a data table with the cell-wise calculated segregation and assortment values. 'summary_observed' is a summary (mean and sd) of the observed segregation and assortment by cell types. 'summary_expected' is a summary of expected segregation and assortment if cell types are reassigned randomly to cells in the environment while maintaining the cell positions and community-wide cell type counts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.