parse_growth_file#

GROWTH_COLUMNS = ['TICK', 'SEED', 'U', 'V', 'W', 'Z', 'POSITION', 'POPULATION', 'STATE', 'VOLUME', 'CYCLE']#

Column names for growth data parsed into tidy data format.

CELL_STATES = ['NEUTRAL', 'APOPTOTIC', 'QUIESCENT', 'MIGRATORY', 'PROLIFERATIVE', 'SENESCENT', 'NECROTIC']#

Cell state names.

parse_growth_file(tar: TarFile) DataFrame[source]#

Parse simulation growth data into tidy data format.

Parameters:

tar – Tar archive containing growth data.

Returns:

Parsed growth data.

parse_growth_timepoint(data: dict, seed: int) list[source]#

Parse growth data for a single simulation timepoint.

Original data is formatted as:

{
    "time": time,
    "cells": [
        [
            [u, v, w, z],
            [
                [
                    type,
                    population,
                    state,
                    position,
                    volume,
                    [cell, cycle, lengths, ...]
                ],
                ...
            ]
        ],
        ...
    ]
}

Parsed data is formatted as:

[
    [time, seed, u, v, w, z, position, population, state, volume, cell_cycle],
    [time, seed, u, v, w, z, position, population, state, volume, cell_cycle],
    ...
]

Cell cycle length is None if the cell has not yet divided. Otherwise, cell cycle is the average of all cell cycle lengths.

Parameters:
  • data – Original simulation data.

  • seed – Random seed.

Returns:

Parsed simulation data.