Skip to contents

This functions calculates cell-wise and mean cell type segregation and assortment values as suggested by Yanni et al. (2019) Current Biology.

Usage

calc_assortment(object, r = 5, iter = NULL, n_simulations = 10)

Arguments

object

S4-object of type growthSimulation.

r

Numeric. Maximum distance to to other cells to considered as neighbour. Refers to the surface-to-surface distance of cells. Unit: \(\mu\)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.

Value

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.

Details

Cell segregation and assortment is calculated as suggested by Yanni et al. (2019) Current Biology.