Chemotaxis Simulation
Note: The applet below may take up to two minutes to load.
If your browser exhibits "ghosting" and multiple painting, simply minimize
and then maximize your browser window (or vice versa).
Potential Types
- exponential: Potential(r) = Ae-ar +
Be-br
where A is the attractant amplitude,
a is the attractant decay,
B is the repellent amplitude and
b is the repellent decay.
- inverse powers: Potential(r) = Ar-a +
Br-b
where A is the attractant amplitude,
a is the attractant decay,
B is the repellent amplitude and
b is the repellent decay.
- To compare the attractant vs repellent profiles,
click on the Compare Attractant-Repellent button.
Extra instructions
- Click on any point in the display to see how many cells are
there and what are the values of the potentials there. This
is called a probe.
- Changing parameter values can only be done in a stopped state.
- Pressing the Show 3D Potential Data produces a window
with the current background potentials. The first two columns
give the location and the third column gives the potential.
The last block of numbers which begins with "0" in the first
two columns gives the data for the cells (the value in the
third column is the number of cells).
Data Manipulation (Producing 3D plots)
- Using gnuplot to transform
the 3D data into a surface plot:
- Select the desired display potential (attractant, repellent,
combined).
- Push the Show 3D Potential Data button.
- Copy the data from the window up to the last block of numbers
which have "0" in the first two columns and store it in a file
called data.
- Place the file surf.gp in the same
directory as data. (Note: you can edit this file
to produce different output. Currently, it is set to
display in an Xwindow environment.)
- Execute gnuplot and give the command load 'surf.gp'.
- Using MATLAB to transform
the 3D data:
- Select the desired display potential (attractant, repellent,
combined).
- Push the Show 3D Potential Data button.
- Copy the all the data from the window (using your
system's cut and paste functions) and store it in a file
called data.
- To see a surface plot, first download the file
surfdata.m into the same directory
as the data file. Envoke MATLAB such that the working
directory is the same as all your data. Give the command
surfdata.
- To see a contour plot, first download the file
contdata.m into the same directory
as the data file. Envoke MATLAB such that the working
directory is the same as all your data. Give the command
contdata.
- Calculating average closest neighbor distance:
- Push the Show 3D Potential Data button.
- Copy the data from the window beginning with the last block of
numbers which have "0" in the first two columns into a file.
(If you already have done
this to see a surface plot in matlab, simply edit the data
file so that only the last block of numbers appears.)
- Download the C program avgdist.c.
- Compile the C program. If you're on an Unix system, this
can be done most likely by giving the command
gcc -o avgdist avgdist.c -lm which will make the executuable
file avgdist.
- Execute the program with the command
./avgdist foo where foo is the name of the file
with the cell data.