molyso.mm package¶
MM Module, contains Mother Machine analysis specific functionality.
molyso.mm.cell_detection module¶
documentation
-
class
molyso.mm.cell_detection.Cell(top, bottom, channel)[source]¶ Bases:
objectA Cell.
Parameters: - top – coordinate of the ‘top’ of the cell, in channel coordinates
- bottom – coordinate of the ‘bottom’ of the cell, in channel coordinates
- channel – Channel object the cell belongs to
-
bottom¶ Returns the absolute (on rotated image) coordinate of the cell bottom.
Returns:
-
cell_image¶ The cell image, cropped out of the channel image.
Returns: image Return type: numpy.ndarray
-
centroid¶ Returns the (absolute coordinate on rotated image) centroid (2D). :return: :rtype: list
-
centroid_1d¶ Returns the (one dimensional) (absolute coordinate on rotated image) centroid. :return: centroid :rtype: float
-
channel¶
-
crop_out_of_channel_image(channel_image)[source]¶ Crops the clel out of a provided image. Used internally for
Cell.cell_image(), and to crop cells out of fluorescence channel images.Parameters: channel_image (numpy.ndarray) – Returns: image Return type: numpy.ndarray
-
length¶ Returns the cell length.
Returns: length
-
local_bottom¶
-
local_top¶
-
top¶ Returns the absolute (on rotated image) coordinate of the cell top.
Returns: top
molyso.mm.channel_detection module¶
documentation
-
class
molyso.mm.channel_detection.Channel(image, left, right, top, bottom)[source]¶ Bases:
objectParameters: - image –
- left –
- right –
- top –
- bottom –
-
bottom¶ Returns:
-
cells¶
-
cells_type¶ alias of
molyso.mm.cell_detection.Cells
-
centroid¶ Returns:
-
channel_image¶
-
image¶
-
left¶
-
putative_orientation¶
-
real_bottom¶
-
real_top¶
-
right¶
-
top¶ Returns:
-
class
molyso.mm.channel_detection.Channels(image, bootstrap=True)[source]¶ Bases:
objectdocstring
-
centroids¶ Returns:
-
channels_list¶
-
image¶
-
nearest_tree¶
-
molyso.mm.fluorescence module¶
molyso.mm.highlevel module¶
molyso.mm.highlevel_interactive_ground_truth module¶
documentation
molyso.mm.highlevel_interactive_viewer module¶
documentation
molyso.mm.image module¶
molyso.mm.tracking module¶
documentation
-
class
molyso.mm.tracking.TrackedPosition[source]¶ Bases:
objectA TrackedPosition object contains various CellTracker objects for each channel within a multipoint position, as well as other information associated with the position.
-
align_channels(progress_indicator=<callable_iterator object>)[source]¶ Parameters: progress_indicator –
-
guess_channel_orientation()[source]¶ Tries to guess the channel orientation. 1 if the closed end (‘mother side’) is the high coordinates, -1 if low …
-
logger¶
-
-
molyso.mm.tracking.analyse_cell_fates(tracker, previous_cells, current_cells)[source]¶ Parameters: - tracker –
- previous_cells –
- current_cells –
Returns:
molyso.mm.tracking_infrastructure module¶
This module contains cell tracking infrastructure.
-
class
molyso.mm.tracking_infrastructure.CellCrossingCheckingGlobalDuoOptimizerQueue[source]¶ Bases:
object
-
class
molyso.mm.tracking_infrastructure.CellTracker[source]¶ Bases:
objectThe CellTracker contains all tracks of a channel.
-
all_tracked_cells¶
-
average_cells¶ Returns the average count of cells present in this tracked channel.
Returns:
-
get_cell_by_observation(where)[source]¶ Returns the associated cell by its observation.
Parameters: where – Returns:
-
new_observed_cell(where)[source]¶ Creates a new TrackedCell object, with added observation.
Parameters: where – Returns:
-
new_observed_origin(where)[source]¶ Creates a new TrackedCell object and adds it as an origin, with added observation. :param where: :return:
-
origins¶
-
timepoints¶
-
molyso.mm.tracking_output module¶
documentation
-
molyso.mm.tracking_output.analyze_tracking(cells, receptor, meta=None)[source]¶ Parameters: - meta –
- cells –
- receptor –
-
molyso.mm.tracking_output.catch_attribute_error(what, otherwise)[source]¶ runs callable ‘what’ and catches AttributeError, returning ‘otherwise’ if one occurred :param what: callable :param otherwise: alternate result in case of IndexError :return: result of ‘what’ or ‘otherwise’ in case of IndexError
-
molyso.mm.tracking_output.catch_index_error(what, otherwise)[source]¶ runs callable ‘what’ and catches IndexErrors, returning ‘otherwise’ if one occurred :param what: callable :param otherwise: alternate result in case of IndexError :return: result of ‘what’ or ‘otherwise’ in case of IndexError
-
molyso.mm.tracking_output.plot_timeline(p, channels, cells, figure_presetup=None, figure_finished=None, show_images=True, show_overlay=True, leave_open=False)[source]¶ Parameters: - p –
- channels –
- cells –
- figure_presetup –
- figure_finished –
- show_images –
- show_overlay –
- leave_open –
-
molyso.mm.tracking_output.s_to_h(s)[source]¶ converts seconds to hours :param s: seconds :return: hours