TemporalTissueGraph implementation proposal¶
Biological observations¶
The typical object is a discrete time-series of multicellular tissue observations (from microscopy). Cell-based segmentation, manual or algorithmic, is required to access the spatial information hidden in the intensity image. Cell lineage, is required to access the temporal information.
Goal¶
The goal of this data structure is to provide a flexible graph object dedicated to the exploration of discrete dynamic multicellular tissue properties.
It leverages the
TissueGraph
class.Biological semantic should be used when possible.
Structure¶
A lineage graph define the temporal relationships between the -spatial- TissueGraph
objects.
A dictionary of TissueGraph
gather the discrete observations of multicellular tissues.
The lineage graph is a networkx.DiGraph()
.
The time intervals between each observation is required to perform temporal differentiation of spatial properties!
Elements ids¶
The topological element ids are now also indexed by time.
Primal graph¶
temporal cell ids as nodes:
tcid=(t, cid)
an integert
for time and an integercid
for the cell id, e.g.(0, 5)
for cell5
at time0
temporal cell-wall ids as edges:
twid=(t, wid)=(t, (cid_i, cid_j))
an integert
for time and a len-2 tuple of integerswid=(cid_i, cid_j)
for the cell-wall id, e.g.(0, (5, 6))
for cell-wall(5, 6)
at time0
twid=(tcid_i, tcid_j)=((t, cid_i), (t, cid_j))
two len-2 tuple of integerstcid_i
andtcid_j
for the two temporal cell ids defining the cell-wall, e.g.((0, 5), (0, 6))
for cells5
and6
at time0
.
Dual graph¶
temporal cell-vertex ids as nodes:
tvid=(t, vid)=(t, (cid_i, cid_j, cid_k, cid_l))
an integert
for time and a len-4 tuple of integersvid=(cid_i, cid_j, cid_k, cid_l)
for the cell-vertex id, e.g.(0, (5, 6, 7, 8))
for cell-vertex(5, 6, 7, 8)
at time0
tvid=(tcid_i, tcid_j, tcid_k, tcid_l)=((t, cid_i), (t, cid_j), (t, cid_k), (t, cid_l))
four len-2 tuple of integerstcid_i
,tcid_j
,tcid_k
andtcid_l
for the four temporal cell ids defining the cell-vertex, e.g.((0, 5), (0, 6), (0, 7), (0, 8))
for cells5
,6
,7
and8
at time0
.
temporal cell-edge ids as edges:
teid=(t, eid)=(t, (vid_1, vid_2))=(t, ((cid_i1, cid_j1, cid_k1, cid_l1), (cid_i2, cid_j2, cid_k2, cid_l2)))
an integert
for time and two len-4 tuple of integersvid_1=(cid_i1, cid_j1, cid_k1, cid_l1)
andvid_2=(cid_i2, cid_j2, cid_k2, cid_l2)
for the two cell-vertex id, e.g.(0, ((5, 6, 7, 8), (5, 6, 7, 9)))
for cell-vertices(5, 6, 7, 8)
and(5, 6, 7, 9)
at time0
teid=(tvid_1, tvid_2)=((tcid_i1, tcid_j1, tcid_k1, tcid_l1), (tcid_i2, tcid_j2, tcid_k2, tcid_l2))=(((t, cid_i1), (t, cid_j1), (t, cid_k1), (t, cid_l1)), ((t, cid_i2), (t, cid_j2), (t, cid_k2), (t, cid_l2)))
two len-4 tuple of integerstvid_1
andtvid_2
for the two temporal vertex ids defining the cell-edge, e.g.(((0, 5), (0, 6), (0, 7), (0, 8)), ((0, 5), (0, 6), (0, 7), (0, 9)))
for the two cell-vertices(5, 6, 7, 8)
and(5, 6, 7, 9)
at time0
.
Methods¶
Creation methods¶
The first step is to populate the data structure with the spatial and temporal data.
Add topological tissue graph¶
The following methods allow to add topological tissue graph:
ttg = TemporalTissueGraph()
ttg.add_tissue_graph(tissue, elapsed_time, unit='h')
Add cell lineage¶
The following methods allow to add cell lineages as temporal relationships between the tissue graphs:
ttg.add_lineage(ancestor_tp, lineage)
Exploration methods¶
We want to be able to “explore” the data structure
Temporal exploration¶
ttg.child(tp, cell_id)
ttg.parent(tp, cell_id)
ttg.siblings(tp, cell_id)
Spatial exploration¶
Warning
Should we create methods ttg.neighbors(cid, tp)
or access from tissueGraph
with ttg._tissue_graph[tp].neighbors(cid)
?