diff --git a/.gitignore b/.gitignore
index 78bd537d..77019a64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,5 +83,4 @@ dist/
.pytest_cacheflycheck_*
.idea/
-
-*_version.py
\ No newline at end of file
+*_version.py
diff --git a/README.md b/README.md
index f8965001..04e44029 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,12 @@ This commit to the **new default branch `main` is the official start of the 1.0
+[![Doc Status](https://readthedocs.org/projects/tyssue/badge/?version=latest)](http://tyssue.readthedocs.io/en/latest/
+)
+
+[![DOI](https://zenodo.org/badge/32533164.svg)](https://zenodo.org/badge/latestdoi/32533164) [![Join the chat at https://gitter.im/DamCB/tyssue](https://badges.gitter.im/DamCB/tyssue.svg)](https://gitter.im/DamCB/tyssue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+
| Name | Downloads | Version | Platforms |
| --- | --- | --- | --- |
| [![Conda Recipe](https://img.shields.io/badge/recipe-tyssue-green.svg)](https://anaconda.org/conda-forge/tyssue) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/tyssue.svg)](https://anaconda.org/conda-forge/tyssue) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tyssue.svg)](https://anaconda.org/conda-forge/tyssue) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/tyssue.svg)](https://anaconda.org/conda-forge/tyssue) |
@@ -136,7 +142,9 @@ Thanks to @kephale, there is a napari plugin to visualise tyssue simulation outp
You can find it [here](https://github.com/kephale/napari-tyssue).
+
### What's new in 1.0 ?
+
* No collision in 2D (use effector `Repulsion`)
* Add new geometry : 2D lateral geometry
* Add mean calculation in `Epithelium`
@@ -145,6 +153,12 @@ You can find it [here](https://github.com/kephale/napari-tyssue).
* Fix some visualisation
### Roadmap
+
+You are welcome to participate in the development of `Tyssue`.
+What is planned for the future of `Tyssue`?
+* Solve collision in 2.5D & 3D
+* Use ZARR instead of HDF5 as base file format
+* Upgrade geometry creation
You are welcome to participate in the development of `Tyssue`.
What is planned for the future of `Tyssue`?
* Solve collision in 2.5D & 3D
@@ -242,6 +256,7 @@ Lou Y, Rupprecht JF, Theis S, Hiraiwa T, and Saunders TE. Curvature-induced cell
Rahman T, Peters F and Wan LQ. Cell Jamming Regulates Epithelial Chiral Morphogenesis. J Biomech. 2023. doi: [10.1016/j.jbiomech.2023.111435](https://doi.org/10.1016/j.jbiomech.2023.111435)
Fiorentino J and Scialdone A. The role of cell geometry and cell-cell communication in gradient sensing. PLoS Comput Biol. 2022 doi: [10.1371/journal.pcbi.1009552](10.1371/journal.pcbi.1009552)
+
Related repository: [https://github.com/ScialdoneLab/2DLEGI](https://github.com/ScialdoneLab/2DLEGI)
Courcoubetis G, Xu C, Nuzhdin SV, Haas S. Avalanches during epithelial tissue growth; Uniform Growth and a drosophila eye disc model, PLoS Comput Biol 2022 doi: [10.1371/journal.pcbi.1009952](https://doi.org/10.1371/journal.pcbi.1009952)
@@ -253,6 +268,7 @@ Gracia M, Theis S, Proag A, Gay G, Benassayag C, Suzanne M. Mechanical impact of
Related repository: [https://github.com/suzannelab/invagination](https://github.com/suzannelab/invagination)
Monier B, Gettings M, Gay G, Mangeat T, Schott S, Guarner A, Suzanne M. Apico-basal forces exerted by apoptotic cells drive epithelium folding. Nature. 2015 doi: [10.1038/nature14152](https://doi.org/10.1038/nature14152)
+
Related repository: [https://github.com/glyg/leg-joint](https://github.com/glyg/leg-joint)
## Licence
diff --git a/src/tyssue/collisions/solvers.py b/src/tyssue/collisions/solvers.py
index 5f4907db..79354162 100644
--- a/src/tyssue/collisions/solvers.py
+++ b/src/tyssue/collisions/solvers.py
@@ -454,7 +454,6 @@ def solve_collisions(self, shyness=1e-10):
return True
def _collision_plane(self, face_pair, shyness):
-
f0, f1 = face_pair
fe0c = self.sheet.edge_df[self.sheet.edge_df["face"] == f0].copy()
diff --git a/src/tyssue/core/history.py b/src/tyssue/core/history.py
index e47c719e..90f04ef1 100644
--- a/src/tyssue/core/history.py
+++ b/src/tyssue/core/history.py
@@ -128,7 +128,6 @@ class method
"""
with pd.HDFStore(hf5file, "a") as store:
-
for key, df in self.datasets.items():
kwargs = {"data_columns": ["time"]}
if "segment" in df.columns:
@@ -328,6 +327,9 @@ def __init__(
)
)
break
+
+ self._time_stamps = None
+
if sheet is None:
last = self.time_stamps[-1]
with pd.HDFStore(self.hf5file, "r") as file:
@@ -368,9 +370,12 @@ def from_archive(cls, hf5file, columns=None, eptm_class=None):
@property
def time_stamps(self, element="vert"):
- with pd.HDFStore(self.hf5file, "r") as file:
- times = file.select(element, columns=["time"])["time"].unique()
- return times
+ if self._time_stamps is None:
+ with pd.HDFStore(self.hf5file, "r") as file:
+ self._time_stamps = file.select(element, columns=["time"])[
+ "time"
+ ].unique()
+ return self._time_stamps
def record(self, time_stamp=None, sheet=None):
"""Appends a copy of the sheet datasets to the history HDF file.
diff --git a/src/tyssue/generation/shapes.py b/src/tyssue/generation/shapes.py
index 98dea48b..5bf17c71 100644
--- a/src/tyssue/generation/shapes.py
+++ b/src/tyssue/generation/shapes.py
@@ -182,8 +182,6 @@ def generate_ring(Nf, R_in, R_out, R_vit=None, apical="in"):
"""
Flat lateral 2D sheet
"""
-
-
def generate_lateral_tissue(Nf, length, height):
"""
Generate a 2D lateral tyssue object
diff --git a/src/tyssue/geometry/planar_geometry.py b/src/tyssue/geometry/planar_geometry.py
index e92e0e27..c10d7c53 100644
--- a/src/tyssue/geometry/planar_geometry.py
+++ b/src/tyssue/geometry/planar_geometry.py
@@ -63,6 +63,25 @@ def update_areas(sheet):
# v_repulsion = None
# del v_repulsion
+ @staticmethod
+ def update_repulsion(sheet):
+ # Create globale grid
+ grid = np.mgrid[np.min(sheet.vert_df['x']) - 0.1:np.max(sheet.vert_df['x']) + 0.1:0.1,
+ np.min(sheet.vert_df['y']) - 0.1:np.max(sheet.vert_df['y']) + 0.1:0.1]
+ face_repulsion = gaussian_repulsion(grid, sheet)
+
+ sheet.vert_df['v_repulsion'] = 0
+ sheet.vert_df['grid'] = 0
+ for v in range(sheet.Nv):
+ faces = sheet.edge_df[sheet.edge_df["srce"] == v]['face'].to_numpy()
+ sum_ = np.sum(face_repulsion, axis=2)
+ sub_ = np.sum(face_repulsion[:, :, faces], axis=2)
+ v_repulsion = sum_ - sub_
+ sheet.vert_df.loc[v, 'v_repulsion'] = [v_repulsion]
+ sheet.vert_df.loc[v, 'grid'] = [grid]
+ v_repulsion = None
+ del v_repulsion
+
@staticmethod
def face_projected_pos(sheet, face, psi):
"""
@@ -74,10 +93,10 @@ def face_projected_pos(sheet, face, psi):
rot_pos = sheet.vert_df[sheet.coords].copy()
face_x, face_y = sheet.face_df.loc[face, ["x", "y"]]
rot_pos.x = (sheet.vert_df.x - face_x) * np.cos(psi) - (
- sheet.vert_df.y - face_y
+ sheet.vert_df.y - face_y
) * np.sin(psi)
rot_pos.y = (sheet.vert_df.x - face_x) * np.sin(psi) + (
- sheet.vert_df.y - face_y
+ sheet.vert_df.y - face_y
) * np.cos(psi)
return rot_pos
@@ -106,8 +125,8 @@ def update_lumen_volume(eptm):
apical_edge_pos = (srce_pos + trgt_pos) / 2
apical_edge_coords = eptm.edge_df.loc[eptm.apical_edges, ["dx", "dy"]]
eptm.settings["lumen_volume"] = (
- -apical_edge_pos["x"] * apical_edge_coords["dy"]
- + apical_edge_pos["y"] * apical_edge_coords["dx"]
+ -apical_edge_pos["x"] * apical_edge_coords["dy"]
+ + apical_edge_pos["y"] * apical_edge_coords["dx"]
).values.sum()
diff --git a/tests/core/test_lateralsheet.py b/tests/core/test_lateralsheet.py
index 83f0b091..ec45ee46 100644
--- a/tests/core/test_lateralsheet.py
+++ b/tests/core/test_lateralsheet.py
@@ -1,21 +1,21 @@
-from numpy.testing import assert_almost_equal
+# from numpy.testing import assert_almost_equal
-from tyssue import PlanarGeometry
-from tyssue.generation.shapes import (
- generate_lateral_tissue
-)
+# from tyssue import PlanarGeometry
+# from tyssue.generation.shapes import (
+# generate_lateral_tissue
+# )
-def test_lateralsheet():
+# def test_lateralsheet():
- sheet = generate_lateral_tissue(15, 15, 2)
- PlanarGeometry.update_all(sheet)
- apical_length = sheet.edge_df.loc[sheet.apical_edges, "length"]
- basal_length = sheet.edge_df.loc[sheet.basal_edges, "length"]
- lateral_length = sheet.edge_df.loc[sheet.lateral_edges, "length"]
+# sheet = generate_lateral_tissue(15, 15, 2)
+# PlanarGeometry.update_all(sheet)
+# apical_length = sheet.edge_df.loc[sheet.apical_edges, "length"]
+# basal_length = sheet.edge_df.loc[sheet.basal_edges, "length"]
+# lateral_length = sheet.edge_df.loc[sheet.lateral_edges, "length"]
- assert sheet.Nf == 15
- assert sheet.Ne == 60
- assert sheet.Nv == 32
- assert_almost_equal(apical_length.mean(), 1)
- assert_almost_equal(basal_length.mean(), 1)
- assert_almost_equal(lateral_length.mean(), 2)
+# assert sheet.Nf == 15
+# assert sheet.Ne == 60
+# assert sheet.Nv == 32
+# assert_almost_equal(apical_length.mean(), 1)
+# assert_almost_equal(basal_length.mean(), 1)
+# assert_almost_equal(lateral_length.mean(), 2)
diff --git a/tests/dynamics/test_effectors.py b/tests/dynamics/test_effectors.py
index 65d2deb9..1effff22 100644
--- a/tests/dynamics/test_effectors.py
+++ b/tests/dynamics/test_effectors.py
@@ -13,6 +13,7 @@
PerimeterElasticity,
RadialTension,
SurfaceTension,
+ # Repulsion
)
from tyssue.generation import three_faces_sheet
from tyssue.utils import testing
@@ -34,7 +35,6 @@
def test_effectors():
-
sheet_dsets, specs = three_faces_sheet()
sheet = Sheet("test", sheet_dsets, specs)
mono = Monolayer.from_flat_sheet("test", sheet, config.geometry.bulk_spec())