structboost.SimulationResult

class structboost.SimulationResult(counts, stage_labels, stage_sizes, marker_mask, gene_means, size_factors, batch_labels, params, gene_level=None, leaf_paths=None, hierarchy=None)[source]

Bases: object

Simulated counts together with the ground truth used to generate them.

Parameters:
counts

Integer UMI counts, shape (n, n_genes).

Type:

NDArray[np.int32]

stage_labels

Stage index per cell, shape (n,). -1 marks leftover background cells that belong to no stage (possible when n is not divisible by stageno).

Type:

NDArray[np.intp]

stage_sizes

Number of cells per stage, shape (stageno,).

Type:

NDArray[np.intp]

gene_level

Shape (n_genes,). Which level of the cell-type hierarchy each gene marks — 0 is the broadest — or -1 for a noise gene. With hierarchy=None every marker is level 0.

Type:

NDArray[np.intp]

leaf_paths

Shape (stageno, n_levels). Ancestry of each leaf population, so leaf_paths[k, d] is the node index of population k at depth d. These become the per-level cell labels in the AnnData wrapper.

Type:

NDArray[np.intp]

hierarchy

The branching factors used, or None for the flat layout.

Type:

tuple[int, …] | None

marker_mask

Boolean marker indicator, shape (stageno, n_genes). marker_mask[k, j] is True when gene j is a marker of stage k. Genes in the overlap between two consecutive stages are True in both rows.

Type:

BoolArray

gene_means

Baseline expression mean per gene (lambda_j), shape (n_genes,).

Type:

NDArray[np.float64]

size_factors

Per-cell library size factor, shape (n,). All exactly 1.0 when lib_size_sd == 0.

Type:

NDArray[np.float64]

batch_labels

Batch index per cell, shape (n,).

Type:

NDArray[np.intp]

params

Scalar simulation parameters. Contains no None values so it can be stored in adata.uns and round-tripped through h5ad.

Type:

dict[str, int | float | bool | str]

Methods

__init__(counts, stage_labels, stage_sizes, ...)

Attributes

property marker_genes: numpy.ndarray

Genes that are a marker of at least one stage, shape (n_genes,).