anim: Functions to Make Animations

Description Usage Arguments Details References Examples

Description

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

Usage

1
2
3
  anim.TCA(redox = list(O2 = c(-95, -60)), high.T = FALSE,
    nframes = 100, pHlim = c(0,10), width = 420, height = 320)
  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 system, or 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 calculations are performed as intended, each function first removes 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 °C unless high.T is TRUE, in which case high-temperature (100 °C) stability fields are overlaid.

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 logaH2 = -11 + 3/40 * T(degC); this equation comes from a model of relative stabilities of proteins in a hot-spring environment (Dick and Shock, 2011).

References

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. https://doi.org/10.1371/journal.pone.0022782

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# 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))) 
## End(Not run)

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

CHNOSZ documentation built on June 7, 2017, 3:01 a.m.

Search within the CHNOSZ package
Search all R packages, documentation and source code