cellsystem package

Submodules

cellsystem.cellsystem module

The cell simulation with logging.

class cellsystem.cellsystem.CellSystem(*args, grid_shape=(100, 100), init_genome=None, **kwargs)[source]

Bases: cellsystem.simulation.system.System

A system simulating cell growth.

A cell system is a system subclass, with the automatic initialization of three main entities:

  1. Cells represented by a cell line.
  2. A ‘world’ representing the space that the cells inhabit, and;
  3. A ‘log’ that follows and makes a record of the cells’ actions.

Each part can be accessed by system['cells'], system['world'] and system['log'] respectively.

seed()[source]

Place a single cell in the middle of the world.

class cellsystem.cellsystem.SimpleCells(*args, genome_alphabet=None, **kwargs)[source]

Bases: cellsystem.simulation.cells.CellLine

A cell line representing simple cells with default behaviors.

A cell from this line performs:
  • Cell division,
  • Cell death,
  • Cell migration,
  • Cell genome mutation.
add_cell_to(site)[source]

Add a new, initialized cell to the given site.

Return the added cell to the caller.

static death(cell)[source]

Cellular death.

static death_probability(cell)[source]

Cellular death probability.

static division(cell, preserve_father=False)[source]

Cell division.

Get a new daughter of this cell and place it in a nearby neighboring site.

static division_probability(cell)[source]

Probability that this cell will divide if selected for division.

static migration(cell)[source]

Migrate to a neighboring cell.

static migration_probability(cell)[source]

Migration probability for this cell.

static mutation(cell)[source]

Do a single site mutation.

static mutation_probability(cell)[source]

Probability to mutate if selected for it.

Module contents

class cellsystem.CellSystem(*args, grid_shape=(100, 100), init_genome=None, **kwargs)[source]

Bases: cellsystem.simulation.system.System

A system simulating cell growth.

A cell system is a system subclass, with the automatic initialization of three main entities:

  1. Cells represented by a cell line.
  2. A ‘world’ representing the space that the cells inhabit, and;
  3. A ‘log’ that follows and makes a record of the cells’ actions.

Each part can be accessed by system['cells'], system['world'] and system['log'] respectively.

seed()[source]

Place a single cell in the middle of the world.