analyze_colony_dynamics#

Workflow for analyzing colony dynamics.

Working location structure:

(name)
└── analysis
    ├── analysis.COLONIES
       └── (name)_(key).COLONIES.csv
    ├── analysis.MEASURES
       └── (name)_(key).MEASURES.csv
    ├── analysis.NEIGHBORS
       ├── (name)_(key)_(seed).NEIGHBORS.csv
       └── (name)_(key)_(seed).NEIGHBORS.tar.xz
    └── analysis.NETWORKS
        └── (name)_(key).NETWORKS.pkl

Data from analysis.NEIGHBORS are processed into analysis.COLONIES. Networks are saved to analysis.NETWORKS. Graph analysis is saved to analysis.MEASURES.

TODO: update for new calculate_neighbors flow

Flows

run_flow

Main analyze colony dynamics flow.

run_flow_analyze_measures

Analyze colony dynamics subflow for analyzing graph measures.

run_flow_generate_networks

Analyze colony dynamics subflow for generating network objects.

run_flow_process_data

Analyze colony dynamics subflow for processing data.

run_flow(context: ContextConfig, series: SeriesConfig, parameters: ParametersConfig) None[source]#

Main analyze colony dynamics flow.

Calls the following subflows, in order:

  1. run_flow_process_data()

  2. run_flow_generate_networks()

  3. run_flow_analyze_measures()

run_flow_analyze_measures(context: ContextConfig, series: SeriesConfig, parameters: ParametersConfig) None[source]#

Analyze colony dynamics subflow for analyzing graph measures.

Perform graph analysis on neighbor connections. If the analysis file already exists for a given key, that key is skipped.

run_flow_generate_networks(context: ContextConfig, series: SeriesConfig, parameters: ParametersConfig) None[source]#

Analyze colony dynamics subflow for generating network objects.

Process neighbor connections to generate graph objects where nodes represent cells and edges represent cells that share borders. If the network already exists for a given key and seed, that key and seed are skipped.

run_flow_process_data(context: ContextConfig, series: SeriesConfig, parameters: ParametersConfig) None[source]#

Analyze colony dynamics subflow for processing data.

Process neighbor connections and parsed simulation results to compile into a single dataframe that can used for further analysis. If the combined data already exists for a given key, that key is skipped.

Configs

ContextConfig

Context configuration for analyze colony dynamics flow.

ParametersConfig

Parameter configuration for analyze colony dynamics flow.

SeriesConfig

Series configuration for analyze colony dynamics flow.

class ContextConfig[source]#

Context configuration for analyze colony dynamics flow.

working_location: str#

Location for input and output files (local path or S3 bucket).

class ParametersConfig[source]#

Parameter configuration for analyze colony dynamics flow.

ds: float = 1.0#

Spatial scaling in units/um.

dt: float = 1.0#

Temporal scaling in hours/tick.

valid_ticks: list[int]#

Valid ticks for processing colony dynamics.

class SeriesConfig[source]#

Series configuration for analyze colony dynamics flow.

name: str#

Name of the simulation series.

seeds: list[int]#

List of series random seeds.

conditions: list[dict]#

List of series condition dictionaries (must include unique condition “key”).