postprocessor.core.processes.bud_metric.bud_metric

class postprocessor.core.processes.bud_metric.bud_metric(parameters: bud_metricParameters)

Bases: LineageProcess

Requires mother-bud information to create a new dataframe where the indices are mother ids and values are the daughters’ values for a given signal.

Attributes
parameters

Methods

filter_signal_cells(signal)

Use casting to filter cell ids in signal and lineage

get_bud_metric(signal, md)

signal: Daughter-inclusive dataframe md: Mother-daughters dictionary where key is mother's index and value a list of daugher indices

load_lineage(lineage)

Reshape the lineage information if needed

as_function

default_parameters

run

__init__(parameters: bud_metricParameters)

Methods

__init__(parameters)

as_function(data, *args, **kwargs)

default_parameters(*args, **kwargs)

filter_signal_cells(signal)

Use casting to filter cell ids in signal and lineage

get_bud_metric(signal, md)

signal: Daughter-inclusive dataframe md: Mother-daughters dictionary where key is mother's index and value a list of daugher indices

load_lineage(lineage)

Reshape the lineage information if needed

run(signal[, mother_bud_ids])

Attributes

parameters

filter_signal_cells(signal: DataFrame)

Use casting to filter cell ids in signal and lineage

static get_bud_metric(signal: DataFrame, md: Dict[Tuple, Tuple[Tuple]])

signal: Daughter-inclusive dataframe md: Mother-daughters dictionary where key is mother’s index and value a list of daugher indices

Get fvi (First Valid Index) for all cells Create empty matrix for every mother:

  • Get daughters’ subdataframe

  • sort daughters by cell label

  • get series of fvis

  • concatenate the values of these ranges from the dataframe

Fill the empty matrix Convert matrix into dataframe using mother indices

load_lineage(lineage)

Reshape the lineage information if needed