postprocessor.compiler.ExperimentCompiler

class postprocessor.compiler.ExperimentCompiler(CompilerParameters, exp_path: PosixPath)

Bases: Compiler

Attributes
ntraps

Get the number of traps in each position.

parameters

Methods

compile_dmetrics([stages])

Generate dataframe with dVol metrics without major cell picking.

compile_fluorescence([metrics, norm])

Get a single signal per.

compile_growth_metrics([min_nbuddings])

Filter mothers with n number of buddings and get their metrics.

compile_last_valid_tp()

Last valid timepoint per position.

compile_pertrap_metric([ranges, metric])

Get the number of cells per trap present during the given ranges.

fill_trapcount(srs[, fill_value])

Fill the last level of a MultiIndex in a pd.Series.

get_shared_ids(input_signals[, min_nbuddings])

Get the intersection id of multiple signals.

get_stages()

Use the metadata to give a prediction of the media being pumped at each time point.

guess_metrics([metrics])

First approach at autoselecting certain signals for automated analysis.

load_data(path)

Abstract function that must be reimplemented.

traploc_diffs(traplocs)

Obtain metrics for trap localisation.

add_column

compile_delta_traps

compile_ncells

compile_slice

compile_slice_end

compile_slices

compile_stages_dmetric

concat_signal

count_cells

get_filled_trapcounts

get_tp

run

__init__(CompilerParameters, exp_path: PosixPath)

Methods

__init__(CompilerParameters, exp_path)

add_column(df, new_values_d[, name])

compile_delta_traps()

compile_dmetrics([stages])

Generate dataframe with dVol metrics without major cell picking.

compile_fluorescence([metrics, norm])

Get a single signal per.

compile_growth_metrics([min_nbuddings])

Filter mothers with n number of buddings and get their metrics.

compile_last_valid_tp()

Last valid timepoint per position.

compile_ncells()

compile_pertrap_metric([ranges, metric])

Get the number of cells per trap present during the given ranges.

compile_slice([sigloc, tp, metrics, mode])

compile_slice_end(**kwargs)

compile_slices([nslices])

compile_stages_dmetric()

concat_signal([sigloc, mode])

count_cells([signal, mode])

fill_trapcount(srs[, fill_value])

Fill the last level of a MultiIndex in a pd.Series.

get_filled_trapcounts(signal, metric)

get_shared_ids(input_signals[, min_nbuddings])

Get the intersection id of multiple signals.

get_stages()

Use the metadata to give a prediction of the media being pumped at each time point.

get_tp([sigloc, tp, mode])

guess_metrics([metrics])

First approach at autoselecting certain signals for automated analysis.

load_data(path)

Abstract function that must be reimplemented.

run()

traploc_diffs(traplocs)

Obtain metrics for trap localisation.

Attributes

ntraps

Get the number of traps in each position.

parameters

compile_dmetrics(stages=None)

Generate dataframe with dVol metrics without major cell picking.

compile_fluorescence(metrics: Optional[Dict[str, Tuple[str]]] = None, norm: Optional[tuple] = None, **kwargs)

Get a single signal per.

compile_growth_metrics(min_nbuddings: int = 2)

Filter mothers with n number of buddings and get their metrics.

Select cells with at least two recorded buddings

compile_last_valid_tp() Series

Last valid timepoint per position.

compile_pertrap_metric(ranges: Iterable[Iterable[int]] = [[0, -1]], metric: str = 'count')

Get the number of cells per trap present during the given ranges.

fill_trapcount(srs: Series, fill_value: Union[int, float] = 0) Series

Fill the last level of a MultiIndex in a pd.Series.

Use self to get the max number of traps per position and use this information to add rows with empty values (with plottings of distributions in mind) Parameters ———- srs : pd.Series Series with a pd.MultiIndex index self : ExperimentSelf class with ‘ntraps’ information that returns a dictionary with position -> ntraps. fill_value : Union[int, float] Value used to fill new rows. Returns ——- pd.Series Series with no numbers skipped on the last level. Examples ——– FIXME: Add docs.

get_shared_ids(input_signals: Dict[str, DataFrame], min_nbuddings: Optional[int] = None)

Get the intersection id of multiple signals.

“buddings” must be one the keys in input_signals to use the argument min_nbuddings.

get_stages()

Use the metadata to give a prediction of the media being pumped at each time point. Works for traditional metadata (pre-fluigent).

Returns: —— A list of tuples where in each the first value is the active pump’s contents and the second its associated range of time points

guess_metrics(metrics: Optional[Dict[str, Tuple[str]]] = None)

First approach at autoselecting certain signals for automated analysis.

load_data(path: PosixPath)

Abstract function that must be reimplemented.

property ntraps: dict

Get the number of traps in each position.

Returns ——- dict str -> int Examples ——– FIXME: Add docs.

static traploc_diffs(traplocs: ndarray) list

Obtain metrics for trap localisation.

Parameters ———- traplocs : ndarray (x,2) 2-dimensional array with the x,y coordinates of traps in each column Examples ——– FIXME: Add docs.