Skip to content

PDE solver used to generate Turing patterns.

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
copying.py
Notifications You must be signed in to change notification settings

turimang/turingpatterns

Repository files navigation

Background

Turing patterns were introduced by Alan Turing in 1952 to describe the way patterns can arise naturally out of a uniform state. Reaction-diffusion theories of morphogenesis have served as important models in theoretical biology, as patterns such as hexagons, spirals and stripes are found as solutions of Turing-like reaction-diffusion equations.

The parameters will depend on the physical system under consideration: for example, in fish skin pigmentation, the associated equation is a three-field reaction-diffusion where the linear parameters are associated with pigmentation cell concentration and the diffusion parameters are not the same for all fields.

As well as in biological systems, Turing patterns occur in other natural systems, for example, the wind patterns formed in sand.

The Model

Here, we simulate a system that has been proposed by Alan Turing as a model of animal coat pattern formation. Two chemical substances influencing skin pigmentation interact according to a reaction-diffusion model. This system is responsible for the formation of patterns that are reminiscent of the pelage of zebras, jaguars, and giraffes.

∂ u ∂ t = a Δ u + u − u 3 − v + k

and

τ ∂ v ∂ t = b Δ v + u − v

The variable u represents the concentration of a substance favoring skin pigmentation, whereas v represents another substance that reacts with the first and impedes pigmentation (inhibitor).

In this case we are interested in the case where τ is very big and k=0. This will reduce the above equations to a version of the Fisher reaction diffussion equation:

∂ u ∂ t = a Δ u + u − u 3

In other words, the inhibitor is no longer effective and the melanin is produced in all the domain instead of specific points. This can occur due to a nonsense mutation that causes the gene responsible for the inhibition to malfuction or in extreme cases stop working all together e.g. a protein is not produced at all. Usually, a heterozygous individual with a heatly variation of the genes won't exhibit any alterations to its phenotype, although hetorozygous parants can produce offsprings with both the normal and black phenotype. This can be seen in the photo below, in which twin leopards with diffrent coat pigmentation.

Twin leopards with different pigmentation.

Our Aim

We attempted to create a PDE solver for the Turing equation. In particular we focused on:

  • Testing a numerical solution of the Fisher reaction diffusion equation using the Finite Differences (FD) method and comparing it to the analytical solution using the Neumann boundary condition.
  • Ploting the error between the numerical and analytical solution.
  • Comparing our case of malfuctioning inhibitor (τ big, k=0) to it's normal function and visualising it for different times.
  • Implementing optimisers and MCMC methods to recover the distributions of parameters associated with data generated by a Turing reation-diffusion system.

Installation and Use

Downloading the repo allows you to use the full functionality. Running the main script produces a plot of the signal given by the specialised Fischer equation as a function of space. This is plotted at different time points by the numerical and analytical solutions. The error between the two solutions is compared in the second plot.

The full turing pattern equation is then implemented to show the pattern formation over time at specified parameters that can be changed by the user. A specific time point is taken and noise added, to create data that we could encounter in biology. This process is shown in the 3rd and 4th plots.

An optimisation process is initiated to recover the rough starting values of parameters (morphogens) a and b. These estimates of starting values are used as initial parameters for a MCMC method that recovers the distributions of these parameters. This is represented in the two histograms produced.

Running plot_data allows the user to view the results in a clearer way, with the real input parameters shown.

About

PDE solver used to generate Turing patterns.

Resources

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
copying.py

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages