delta.lineage.Lineage¶
- class delta.lineage.Lineage(cells=<factory>)[source]¶
Represents the cell lineages contained in a ROI.
- Only two functions are required to create a full lineage tree:
createandextendto create a cell and extend it frame after frame;create(frame=0) ------------> frames : 0....5.... 0....5.... cell #1: ╺ create(frame=5) ------------> frames : 0....5.... 0....5.... cell #1: ╺╼╼╼╼╼╼╼╼╼ ╺╼╼╼╼╼╼╼╼╼ cell #2: ╺ create(frame=5, motherid=1) ------------> frames : 0....5.... 0....5.... cell #1: ╺╼╼╼╼╼╼╼╼╼ ╺╼╼╼╼┮╼╼╼╼ cell #2: ┕ extend(cellid=2) ------------> frames : 0....5.... 0....5.... cell #1: ╺╼╼╼╼┮╼╼╼╼ ╺╼╼╼╼┮╼╼╼╼ cell #2: ┕ ┕╼
- To manipulate an already created tree, one needs four more:
splitandmerge, to split a cell into two cells, and reverse the operation;adopt, to change the mother of a cell;pivot, to switch the roles of mother and daughter cells.
The use of these methods is best illustrated by the following diagrams:
split(1, frame=5) ------------> frames : 0....5.... 0....5.... cell #1: ╺╼╼╼╼╼╼╼╼╼ ╺╼╼╼╼ cell #2: ╺╼╼╼╼ <------------ merge(2, 1) adopt(2, 1) pivot(2) adopt(2, None) ------------> ------------> -------------> frames : 0..3...... 0..3...... 0..3...... 0..3...... cell #1: ╺╼╼╼╼╼╼╼╼╼ ╺╼╼┮╼╼╼╼╼╼ ╺╼╼┮╼╼╼ ╺╼╼╼╼╼╼ cell #2: ╺╼╼╼ ┕╼╼╼ ┕╼╼╼╼╼╼ ╺╼╼╼╼╼╼ <------------ <------------ <------------- adopt(2, None) pivot(2) adopt(2, 1)Methods
__init__([cells])adopt(cellid, motherid)Attribute a new mother
motherid(which can beNone) to the cellcellid.compare(other[, level])Print or return the list of differences between two Lineage objects.
compute_growthrates(feature[, smooth_frames])Compute the growth rates of all cells on all frames and store them.
create(frame, features[, motherid])Create a new cell at frame
frame.extend(cellid, features)Extend
cellidwith one more frame.merge(cellid, merge_into_cellid)Rename a cell (
cellid) to merge it into another one (merge_into_cellid).pivot(cellid)Swap the roles between cell
cellidand its mother.split(cellid, frame)Break a cell lineage into two independent cell lineages.
swap_poles(cellid[, frame])Swap the poles of the cell
cellidfor all the frames or for frameframeonwards.Attributes
cellsDictionary of cellids to ``Cell``s