tyssue.generation package¶
Submodules¶
tyssue.generation.from_voronoi module¶

tyssue.generation.from_voronoi.
from_2d_voronoi
(voro, specs=None)¶ Creates 2D (sheet geometry) datasets from a Voronoï tessalation
voro: a
scipy.spatial.Voronoi
object datasets: dict
datasets suitable for
Epithelium
implementation

tyssue.generation.from_voronoi.
from_3d_voronoi
(voro)¶ Creates 3D (bulk geometry) datasets from a Voronoï tessalation
voro: a
scipy.spatial.Voronoi
object datasets: dict
datasets suitable for
Epithelium
implementation
tyssue.generation.hexagonal_grids module¶
Hexagonal grids¶

tyssue.generation.hexagonal_grids.
circle
(num_t, radius=1.0, phase=0.0)¶ Returns x and y positions of num_t points regularly placed around a circle of radius radius, shifted by phase radians.
 num_tint
the number of points around the circle
 radiusfloat, default 1.
the radius of the circle
 phasefloat, default 0.0
angle shift w/r to the x axis in radians
points : np.Ndarray of shape (num_t, 2), the x, y positions of the points

tyssue.generation.hexagonal_grids.
hexa_cylinder
(num_t, num_z, radius=1.0, capped=False, noise=0, orientation='transverse')¶ Returns an arrays of x, y positions of points evenly spread on a cylinder with num_t points on the periphery and num_z points on its length.
 num_tint,
The number of points on the periphery
 num_zint,
The number of points along the z axis (the length of the cylinder)
 radiusfloat, default 1
The radius of the cylinder
 cappedbool, default False
If True, the tips of the cylinder are capped by a disk of point as generated by the hexa_disk function.
 noisefloat, default 0
normaly distributed position noise around the cell points
 orientation{‘transverse’  ‘longitudinal’}, default ‘transverse’
the orientation of the cells (with the longueur axis perpendicular or along the length of the cylinder)

tyssue.generation.hexagonal_grids.
hexa_disk
(num_t, radius=1)¶ Returns an arrays of x, y positions of points evenly spread on a disk with num_t points on the periphery.
 num_tint
the number of poitns on the disk periphery, the rest of the disk is filled automaticaly
 radiusfloat, default 1.
the radius of the disk

tyssue.generation.hexagonal_grids.
hexa_grid2d
(nx, ny, distx, disty, noise=None)¶ Creates an hexagonal grid of points

tyssue.generation.hexagonal_grids.
hexa_grid3d
(nx, ny, nz, distx=1.0, disty=1.0, distz=1.0, noise=None)¶ Creates an hexagonal grid of points

tyssue.generation.hexagonal_grids.
three_faces_sheet
(zaxis=False)¶ Creates the apical junctions mesh of three packed hexagonal faces. If zaxis is True (defaults to False), adds a z coordinates, with z = 0.
Faces have a side length of 1.0 +/ 1e3.
face_df: the faces DataFrame indexed from 0 to 2 vert_df: the junction vertices DataFrame edge_df: the junction edges DataFrame

tyssue.generation.hexagonal_grids.
three_faces_sheet_array
()¶ Creates the apical junctions mesh of three packed hexagonal faces. If zaxis is True (defaults to False), adds a z coordinates, with z = 0.
Faces have a side length of 1.0 +/ 1e3.
 points: (13, ndim) np.array of floats
the positions, where ndim is 2 or 3 depending on zaxis
 edges: (15, 2) np.array of ints
indices of the edges
 (Nc, Nv, Ne): triple of ints
number of faces, vertices and edges (3, 13, 15)
tyssue.generation.modifiers module¶
This module provides utlities to modify an input tissue through extrusion or subdivision

tyssue.generation.modifiers.
create_anchors
(sheet)¶ Adds an edge linked to every vertices at the boundary and create anchor vertices

tyssue.generation.modifiers.
extrude
(apical_datasets, method='homotecy', scale=0.3, vector=[0, 0,  1])¶ Extrude a sheet to form a monlayer epithelium
apical_datasets: dictionnary of three DataFrames,
‘vert’, ‘edge’, ‘face’ * method: str, optional {‘homotecy’’translation’’normals’} default ‘homotecy’ * scale: float, optional the scale factor for homotetic scaling, default 0.3. * vector: sequence of three floats, optional, used for the translation
default [0, 0, 1]
if method == ‘homotecy’, the basal layer is scaled down from the apical one homoteticaly w/r to the center of the coordinate system, by a factor given by scale
if method == ‘translation’, the basal vertices are translated from the apical ones by the vector vect
if method == ‘normals’, basal vertices are translated from the apical ones along the normal of the surface at each vertex, by a vector whose size is given by scale

tyssue.generation.modifiers.
subdivide_faces
(eptm, faces)¶ Adds a vertex at the center of each face, and returns a new dataset
eptm: a
Epithelium
instance faces: list,indices of the faces to be subdivided
 new_dset: dict
a dataset with the new faces devided
tyssue.generation.shapes module¶

class
tyssue.generation.shapes.
AnnularSheet
(identifier, datasets, specs=None, coords=None)¶ Bases:
tyssue.core.sheet.Sheet
2D annular model of a cylinderlike monolayer.
Provides syntactic sugar to access the apical, basal and lateral segments of the epithlium

property
apical_edges
¶

property
apical_verts
¶

property
basal_edges
¶

property
basal_verts
¶

property
lateral_edges
¶

reset_topo
()¶ Recomputes the number of sides for the faces and the number of faces for the cells.

segment_index
(segment, element)¶

property

tyssue.generation.shapes.
Lloyd_relaxation
(sheet, geom, steps=10, coords=None, update_method=None)¶ Performs Lloyd relaxation on the sheet.

tyssue.generation.shapes.
ellipse_rho
(theta, a, b)¶

tyssue.generation.shapes.
ellipsoid_sheet
(a, b, c, n_zs, **kwargs)¶ Creates an ellipsoidal apical mesh.
 a, b, cfloats
Size of the ellipsoid half axes in the x, y, and z directions, respectively
 n_zsint
The (approximate) number of faces along the z axis.
kwargs are passed to get_ellipsoid_centers
eptm : a
Epithelium
objectThe mesh returned is an Epithelium and not a simpler Sheet so that a unique cell data can hold information on the whole volume of the ellipsoid.

tyssue.generation.shapes.
generate_ring
(Nf, R_in, R_out, R_vit=None, apical='in')¶ Generates a 2D tyssue object aranged in a ring of Nf tetragonal cells with inner diameter R_in and outer diameter R_out
 Nfint
The number of cells in the tissue
 R_infloat
The inner ring diameter
 R_outfloat
The outer ring diameter
 R_vitfloat
The vitelline membrane diameter (a non strechable membrane around the annulus)
 apicalstr {‘in’  ‘out’}
The side of the apical surface if “in”, the apical surface is inside the annulus, facing the lumen as in an organoid; if ‘out’: the apical side is facing the exterior of the tissue, as in an embryo
 eptm
AnnularSheet
2D annular tissue. The R_in and R_out parameters are stored in the class settings attribute.

tyssue.generation.shapes.
get_ellipsoid_centers
(a, b, c, n_zs, pos_err=0.0, phase_err=0.0)¶ Creates hexagonaly organized points on the surface of an ellipsoid
 a, b, c: float
ellipsoid radii along the x, y and z axes, respectively i.e the ellipsoid boounding box will be [[a, a], [b, b], [c, c]]
 n_zsfloat
number of cells on the z axis, typical
 pos_errfloat, default 0.
normaly distributed noise of std. dev. pos_err is added to the centers positions
 phase_errfloat, default 0.
normaly distributed noise of std. dev. phase_err is added to the centers angle ϕ

tyssue.generation.shapes.
sheet_from_cell_centers
(points, noise=0, interp_s=0.0001)¶ Returns a Sheet object from the Voronoï tessalation of the cell centers.
The strategy is to project the points on a sphere, get the Voronoï tessalation on this sphere and reproject the vertices on the original (implicit) surface through linear interpolation of the cell centers.
Works for relatively smooth surfaces (at the very minimum star convex).
 pointsnp.ndarray of shape (Nf, 3)
the x, y, z coordinates of the cell centers
 noisefloat, default 0.0
addiditve normal noise stdev
 interp_sfloat, default 1e4
interpolation smoothing factor (might need to set higher)
sheet : a
Sheet
object with Nf faces

tyssue.generation.shapes.
spherical_monolayer
(R_in, R_out, Nc, apical='out', Lloyd_relax=False)¶ Returns a spherical monolayer with the given inner and outer radii, and approximately the gieven number of cells.
The apical argument can be ‘in’ out ‘out’ to specify wether the apical face of the cells faces inward or outward, reespectively.

tyssue.generation.shapes.
spherical_sheet
(radius, Nf, Lloyd_relax=False, **kwargs)¶ Returns a spherical sheet with the given radius and (approximately) the given number of cells

tyssue.generation.shapes.
update_on_sphere
(sheet)¶
Module contents¶
The generation module provides utilities to easily create Epithelium
objects.