adhesion_class module¶
Implementation of a class to represent the cell-cell adhesions.
-
class
adhesion_class.
Adhesion
(cells, s_coords, average_lifespan, adhesion_type='cadherin')[source]¶ Bases:
object
A class to represent an adhesion agent in a tissue. This is a useful object to keep track of which cells the adhesion is attached to and the coordinates and locations in the deformed and undeformed cortex configurations.
-
cell_index_by_id
(id)[source]¶ Get the local index on a cortex that the adhesion is attached to.
- Parameters
id (string) – The identity of the cell to look on.
- Returns
The local index that the adhesion is connected to for the given cell.
- Return type
string
-
get_angle_relative_to_cortices
()[source]¶ Get the angle the adhesion makes relative to the tangent along both cortices
- Returns
The angle that the adhesion makes relative to the tangent along the connected cortices.
- Return type
(float, float)
-
get_cell_id_at_other_end
(this_cell_id)[source]¶ Returns the identity at the other side of the adhesion, given that we are in
this_cell
- Parameters
this_cell_id (string) – The identity of the cell that we know.
- Returns
The identity of the cell on the other side.
- Return type
string
-
get_force_magnitude
(cell_id_for_new_xy='None', new_xy=(0, 0))[source]¶ Force acting on adhesion
- Parameters
cell_id_for_new_xy (string) – (Default value = ‘None’) Optional identifier for cell that we want to change the position of.
new_xy (tuple) – (Default value = (0, 0) The new (x,y) position of the given cell.
- Returns
The magnitude of (spring) force in the adhesion.
- Return type
float
-
get_length
(cell_id_for_new_xy='None', new_xy=(0, 0))[source]¶ Get the length of the adhesion. Can change the xy location of one of the cells.
- Parameters
cell_id_for_new_xy (string) – (Default value = ‘None’) Optional identifier for cell that we want to change the position of.
new_xy (tuple) – (Default value = (0, 0) The new (x,y) position of the given cell.
- Returns
The length of the adhesion.
- Return type
float
-
get_spacing_at_other_end
(this_cell_id)[source]¶ Returns the spacing at the other side of the adhesion, given that we are in cell with
this_cell_id
- Parameters
this_cell_id (string) – The identity of the cell that we know/are in.
- Returns
The discretised spacing on the other cortex.
- Return type
float
-
get_unit_direction
(cell_id_for_new_xy='None', new_xy=(0, 0))[source]¶ Get a vector describing the direction of the adhesion
- Parameters
cell_id_for_new_xy (string) – (Default value = ‘None’) Optional identifier for cell that we want to change the position of.
new_xy (tuple) – (Default value = (0, 0) The new (x,y) position of the given cell.
- Returns
The direction of the adhesion, from cell1 to cell2
- Return type
list
-
get_vector_force
(from_cell_id, new_xy_for_from_cell=(0, 0))[source]¶ Get a vector for the adhesion force, acting on from_cell_id
- Parameters
cell_id_for_new_xy (string) – (Default value = ‘None’) Optional identifier for cell that we want to change the position of.
new_xy (tuple) – (Default value = (0, 0) The new (x,y) position of the given cell.
- Returns
The vector force exerted by the adhesion on cell 1.
- Return type
list
-
get_xy
()[source]¶ Get the [(x_1, y_1), (x_2, y_2)] coords of the cell connections
- Returns
The coords of the adhesion connections.
- Return type
list
-
get_xy_at_other_end
(this_cell_id)[source]¶ Returns the spacing at the other side of the adhesion, given that we are in this_cell
- Parameters
this_cell_id (string) – The identifier of the cell we know.
- Returns
The (x,y) coords that the adhesion is connected to on the other end.
- Return type
list
-
get_xy_at_this_end
(this_cell_id)[source]¶ Returns the discrete cortex spacing where the adhesion is attached to a given cell
- Parameters
this_cell_id (string) – The identity of the cell to get the spacing.
- Returns
The (x,y) coords that the adhesion is connected to on the given cell.
- Return type
list
-
plot
(ax=None, **plot_params)[source]¶ - Parameters
ax (mpl axis) – (Default value = None) Axis object to plot on.
plot_params (dict) – Optional plotting arguments.
-