organoid_tracker.linking_analysis.lineage_id_creator module

Assigns an id to an lineage tree. The ids are scrambled, so that cells next to each other don’t have a similar id. This makes it easier to color the cells using a color map.

Note: the color depends on the id. The id depends on the sort order of the lineages. Call the sorting method on the links object beforehand to make the id better-defined.

organoid_tracker.linking_analysis.lineage_id_creator.generate_color_for_lineage_id(track_id: int) Color

Gets the RGB color (three numbers from 0 to 1) that the given lineage tree should be drawn in. The id must be a track id or a lineage id.

organoid_tracker.linking_analysis.lineage_id_creator.get_lineage_id(links: Links, position: Position) int

If the given cell is in a lineage tree (i.e. the cell has previously divided, or will divide during the experiment) this returns a scrambled id for that lineage tree. So for cells that do have tracks, but have never divided, this method returns -1.

organoid_tracker.linking_analysis.lineage_id_creator.get_original_track_id(links: Links, position: Position) int

Gets a scrambled id for the original track the position was in. Unlike get_lineage_id, this function returns a value for cells that have never divided.