leg-joint
epithelium model¶%load_ext autoreload
%autoreload 2
%run nb_init.py
eptm = lj.Epithelium(graphXMLfile='../saved_graphs/xml/before_apoptosis.xml',
paramfile='../default/params.xml')
eptm.isotropic_relax()
eptm.graph.save('../saved_graphs/xml/before_apoptosis.xml')
Let's take a slice of the epithelium to pick a cell and look at the division
eptm.set_local_mask(None)
lj.local_slice(eptm, theta_c=0, theta_amp=np.pi/9, zed_c=0, zed_amp=6.)
fig, axes=plt.subplots(1, 2, figsize=(8, 4), sharey=True)
lj.plot_2pannels(eptm, axes=axes)
eptm.set_local_mask(None)
cell n°913 looks fine, let's call it mother_cell
, and look at it more closely.
mother_cell = eptm.graph.vertex(913)
## Clear local mask and set it to be centered on
## the mother cell
eptm.set_local_mask(None)
eptm.set_local_mask(mother_cell, wider=True)
## Create a figure
fig, axes=plt.subplots(1, 2, figsize=(10, 4))#, sharey=True)
axes = lj.plot_2pannels(eptm, axes=axes, local=True)
## Show the forces exerted on the vertices of our cell
axes = lj.plot_2pannels_gradients(eptm, axes=axes, scale=10., approx=1)
axes = lj.plot_2pannels_gradients(eptm, axes=axes, scale=10., approx=0)
plt.tight_layout()
plt.draw()
area0 = eptm.cells.areas[mother_cell]
growth_rate = 1.5
eptm.cells.prefered_vol[mother_cell] *= growth_rate
eptm.update_gradient()
fig, axes=plt.subplots(1, 2, figsize=(10, 4))#, sharey=True)
axes = lj.plot_2pannels(eptm, axes=axes, local=True)
axes = lj.plot_2pannels_gradients(eptm, axes=axes, scale=10., approx=0)
axes = lj.plot_2pannels_gradients(eptm, axes=axes, scale=10., approx=1)
plt.tight_layout()
pos0, pos1 = lj.find_energy_min(eptm)
print('Current relative area: %.3f'
% (eptm.cells.areas[mother_cell] / area0))
Current relative area: 1.455
@before_after
def show_division(eptm, mother_cell):
septum = lj.cell_division(eptm, mother_cell, verbose=True)#, phi_division=np.pi/2.)
return septum
eptm.set_local_mask(None)
eptm.set_local_mask(mother_cell, wider=True)
septum = show_division(eptm, mother_cell)
if septum is not None:
jv0, jv1, mother_cell, daughter_cell = septum
Cell 5126 is born
eptm.isotropic_relax()
pos0, pos1 = show_optimisation(eptm)
eptm.isotropic_relax()
Please refer the original definition in Farhadifar et al. Curr Biol. 2007, Suppplementary figure S1)
In ASCII art
(letters represent junctions and number represent cells):
e 2 d
\ / e d e 2 d
b \/ \ /
1 | 3 ----> ab ----> 1 a-b 3
a /\ / \
/ \ f c f 4 c
f 4 c
The arguments can be either:
eptm.set_local_mask(None)
cell1, cell3 = eptm.graph.vertex(912), eptm.graph.vertex(13)
eptm.set_local_mask(cell1)
eptm.set_local_mask(cell3)
@before_after
def show_type1(eptm, cells):
cell1, cell3 = cells
modified_cells, modified_jverts = lj.type1_transition(eptm, (cell1, cell3))
show_type1(eptm, (cell1, cell3))
po0, pos1 = show_optimisation(eptm, tol=1e-3, approx_grad=0)