generate_setup_file#

DEFAULT_POPULATION_ID = 'X'#

Default population ID used in setup file.

generate_setup_file(samples: pd.DataFrame, margins: tuple[int, int, int], terms: list[str]) str[source]#

Create ARCADE setup file from samples, margins, and CPM Hamiltonian terms.

Initial number of cells is determined by number of unique ids in samples. Regions are included if samples contains valid regions.

Parameters:
  • samples – Sample cell ids and coordinates.

  • margins – Margin size in x, y, and z directions.

  • terms – List of Potts Hamiltonian terms for setup file.

Returns:

Contents of ARCADE setup file.

calculate_sample_bounds(samples: pd.DataFrame, margins: tuple[int, int, int]) tuple[int, int, int][source]#

Calculate transformed sample bounds including margin.

Parameters:
  • samples – Sample cell ids and coordinates.

  • margins – Margin size in x, y, and z directions.

Returns:

Bounds in x, y, and z directions.

make_setup_file(init: int, bounds: tuple[int, int, int], terms: list[str], regions: list[str] | None = None) str[source]#

Create ARCADE setup file.

Parameters:
  • init – Number of initial cells.

  • bounds – Bounds in x, y, and z directions.

  • regions – List of regions.

  • terms – List of Potts Hamiltonian terms for setup file.

Returns:

Contents of ARCADE setup file.