Learn R Programming

CHNOSZ (version 0.9-7)

anim.TCA: Functions to Make Animations

Description

Make animated stability diagrams by creating a series of PNG files.

Usage

anim.TCA(redox = list(O2 = c(-95, -60)), high.T = FALSE,
    nframes = 100, pHlim = c(0,10), width = 420, height = 320)
  anim.plasma(width=480, height=480)
  anim.carboxylase(T = 25:125, ntop = 5, lcex = 0.8, width = 420, height = 320)

Arguments

redox
list, redox variable and limits
high.T
logical, overlay high-temperature diagram?
nframes
numeric, number of frames to be animated
pHlim
numeric, pH limits to use for animation
width
numeric, width of plot device
height
numeric, height of plot device
T
numeric, temperature range for animation
ntop
numeric, number of names to show in legend
lcex
numeric, character expansion factor for legend

Details

These functions create a series of PNG figures that can be converted into an animated diagram. The PNG files are created in the png directory within the current working directory; the functions stop with an error if either this directory is not present or it is present but not empty. After making the PNG files, they are converted to an animated GIF using the convert tool from the ImageMagick software distribution (http://www.imagemagick.org), if it is available on the system. The system command is called using the system function on unix-alikes, and using shell on Windows platforms. When installing ImageMagick on Windows, be sure to leave the Add application directory to your system path option checked; this will make the convert command from ImageMagick available in the shell.

To ensure the results described below, each function here does remove any existing system definition by calling data(thermo).

anim.TCA creates a series of figures showing how a logaH2O - logfO2 activity diagram for various species involved in the tricarboxylic acid (TCA) cycle changes as a function of pH. Alternatively, set redox to list(H2=c(-20,0)) to draw a logaH2O - logaH2 diagram. The diagrams are made at 25 degrees C unless high.T is TRUE, in which case high-temperature (100 degrees C) stability fields are overlain. The number of frames to be used for the animation (as pH increases ranges between the values specified in pHlim) is given by nframes.

anim.plasma produces a series of equilibrium activity diagrams for proteins in human blood plasma, as a function of log aO2 and log aH2, at 25 degrees C. Unlike most other examples in CHNOSZ, the chemical potentials of hydrogen and oxygen in the system are represented by the activities of O2 and H2, and H2O is not used as a basis species. Therefore, the equilibrium activities of H2O vary by many orders of magnitude across these diagrams. The list of proteins is taken from Anderson and Anderson (2003); see the description for the data file AA03.csv in extdata. The first diagram shows the equilibrium predominance fields with all 71 listed proteins in the calculation. In each subsequent diagram, the protein whose predominance field occupies the greatest area on the diagram is removed. The range of heat.colors indicates the reported reference abundances of the proteins, with the deepest (reddest) colors corresponding to the highest abundances.

anim.carboxylase animates equilibrium rank-activity diagrams along a combined temperature and logaH2 gradient, or makes a single plot on the default device (without conversion to animated GIF) if a single temperature is provided. The proteins in the calculation are 24 carboxylases from a variety of organisms. There are 12 ribulose phosphate carboxylase and 12 acetyl-coenzyme A carboxylase; 6 of each type are from nominally mesophilic organisms and 6 from nominally thermophilic organisms, shown as blue and red symbols on the diagrams. The activities of hydrogen at each temperature are calculated using $\log a_{\mathrm{H_{2}}_{\left(aq\right)}}=-11+3/\left(40\times T\left(^{\circ}C\right)\right)$; this equation comes from a model of relative stabilities of proteins in a hot-spring environment (Dick and Shock, 2011).

References

Anderson, N. L. and Anderson, N. G. (2003) The human plasma proteome: History, character and diagnostic prospects (Vol. 1 (2002) 845-867). Molecular and Cellular Proteomics 2, 50. http://dx.doi.org/10.1074/mcp.A300001-MCP200

Dick, J. M. and Shock, E. L. (2011) Calculation of the relative chemical stabilities of proteins as a function of temperature and redox chemistry in a hot spring. PLoS ONE 6, e22782. http://dx.doi.org/10.1371/journal.pone.0022782

Examples

Run this code
# animate a stability diagram with a high-temperature overlay
  anim.TCA(high.T=TRUE)
  # using H2 instead of O2
  anim.TCA(list(H2=c(-20,0)))

  # using anim.carboxylase in non-animation mode
  anim.carboxylase(T=100)

Run the code above in your browser using DataLab