postprocessor.core.processes.picker.picker

class postprocessor.core.processes.picker.picker(parameters: pickerParameters, cells: Cells)

Bases: PostProcessABC

Cells

Cell object passed to the constructor

Condition

Tuple with condition and associated parameter(s), conditions can be

“present”, “nonstoply_present” or “quantile”. Determines the thersholds or fractions of signals/signals to use. :lineage: str {“mothers”, “daughters”, “families” (mothers AND daughters), “orphans”}. Mothers/daughters picks cells with those tags, families pick the union of both and orphans the difference between the total and families.

Attributes
parameters

Methods

get_nodup_idx(start, score, duplicates, nomother)

Return the start DataFrame without duplicates

max_ind_vertex_sets(values, min_distance)

Generates an adjacency matrix from multiple points, joining neighbours closer than min_distance Then returns the maximal independent vertex sets values: list of int values min_distance: int minimal distance to cluster

mb_guess(df, ba, trap, min_budgrowth_t, ...)

Parameters

as_function

default_parameters

get_mothers_daughters

get_slope

mb_guess_wrap

pick_by_condition

pick_by_lineage

run

switch_case

__init__(parameters: pickerParameters, cells: Cells)

Methods

__init__(parameters, cells)

as_function(data, *args, **kwargs)

default_parameters(*args, **kwargs)

get_mothers_daughters()

get_nodup_idx(start, score, duplicates, nomother)

Return the start DataFrame without duplicates

get_slope(x)

max_ind_vertex_sets(values, min_distance)

Generates an adjacency matrix from multiple points, joining neighbours closer than min_distance Then returns the maximal independent vertex sets values: list of int values min_distance: int minimal distance to cluster

mb_guess(df, ba, trap, min_budgrowth_t, ...)

Parameters

mb_guess_wrap(signals, *args)

pick_by_condition(signals, condition, thresh)

pick_by_lineage(signals, how)

run(signals)

switch_case(signals, condition, threshold)

Attributes

parameters

get_nodup_idx(start, score, duplicates, nomother)

Return the start DataFrame without duplicates

Start

pd.Series indicating the first valid time point

Score

pd.Series containing a score to minimise

Duplicates

Dataframe containing duplicated entries

Nomother

Dataframe with non-mother cells

static max_ind_vertex_sets(values, min_distance)

Generates an adjacency matrix from multiple points, joining neighbours closer than min_distance Then returns the maximal independent vertex sets values: list of int values min_distance: int minimal distance to cluster

mb_guess(df, ba, trap, min_budgrowth_t, min_mobud_ratio)
Parameters
signalspd.DataFrame
balist of cell_labels that come from bud assignment
trapTrap id (used to fetch raw bud)
min_budgrowth_t: Minimal number of timepoints we lock reassignment after assigning bud
min_initial_size: Minimal mother-bud ratio when it was first identified
add_ba: Bool that incorporates bud_assignment data after the normal assignment
Thinking this problem as the Movie Scheduling problem (Skiena’s the algorithm design manual chapter 1.2),
we will try to pick the set of filtered cells that grow the fastest and don’t overlap within 5 time points
TODO adjust overlap to minutes using metadata