[CHNOSZ-commits] r172 - in pkg/CHNOSZ: . R demo inst inst/extdata/abundance man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 23 14:52:07 CET 2017


Author: jedick
Date: 2017-02-23 14:52:07 +0100 (Thu, 23 Feb 2017)
New Revision: 172

Removed:
   pkg/CHNOSZ/inst/extdata/abundance/AA03.csv
Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/anim.R
   pkg/CHNOSZ/R/examples.R
   pkg/CHNOSZ/demo/yeastgfp.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/man/CHNOSZ-package.Rd
   pkg/CHNOSZ/man/affinity.Rd
   pkg/CHNOSZ/man/anim.Rd
   pkg/CHNOSZ/man/extdata.Rd
   pkg/CHNOSZ/man/protein.Rd
   pkg/CHNOSZ/man/read.expr.Rd
   pkg/CHNOSZ/man/util.data.Rd
   pkg/CHNOSZ/vignettes/anintro.Rmd
Log:
remove anim.plasma() and AA03.csv


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/DESCRIPTION	2017-02-23 13:52:07 UTC (rev 172)
@@ -1,6 +1,6 @@
 Date: 2017-02-23
 Package: CHNOSZ
-Version: 1.0.8-61
+Version: 1.0.8-62
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/R/anim.R
===================================================================
--- pkg/CHNOSZ/R/anim.R	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/R/anim.R	2017-02-23 13:52:07 UTC (rev 172)
@@ -75,67 +75,6 @@
   }
 }
 
-anim.plasma <- function(width=480, height=480) {
-  ## animate relative metastabilities of plasma proteins,
-  ## as a function of chemical activities of H2 and O2
-  ## start with 71 proteins; one protein is removed in 
-  ## each successive frame
-  ## 20110804 jmd
-  # make sure we have an empty png directory
-  if(!"png" %in% dir()) stop("directory 'png' not present")
-  else if(length(dir("png")) > 0) stop("directory 'png' not empty")
-  # get list of proteins
-  f <- system.file("extdata/abundance/AA03.csv", package="CHNOSZ")
-  pdata <- read.csv(f, as.is=TRUE)
-  notna <- !is.na(pdata$name)
-  pname <- pdata$name[notna]
-  # set up the system; use O2 aq instead of gas
-  basis(c("CO2","NH3","H2S","H2","O2","H+"))
-  basis("O2","aq")
-  basis(c("CO2","NH3","H2S","H+"),c(-3,-3,-10,-7))
-  species(pname,"HUMAN")
-  a <- affinity(H2=c(-20,0), O2=c(-80,-60))
-  # start with all species
-  ispecies <- 1:length(pname)
-  # open plot file
-  png("png/plasma%03d.png",width=width, height=height)
-  # numbers of proteins for each frame
-  np <- length(pname):2
-  # add some lead-in and lead-out frames
-  np <- c(rep(head(np,1),8),np,rep(tail(np,1),8))
-  # now loop until we get to two proteins
-  for(i in 1:length(np)) {
-    d <- diagram(a, groups=as.list(ispecies), names=pname[ispecies], normalize=TRUE, cex=1.5)
-    # note that the darker colors go with higher abundances
-    # as reported by Anderson and Anderson, 2003
-    # how many show up on the diagram?
-    nshow <- length(unique(as.numeric(d$predominant)))
-    title(main=paste(np[i]," human plasma proteins (",nshow,
-      " showing)",sep=""),cex.main=1)
-    if(c(0,diff(np))[i] != 0) {
-      # identify the protein with the greatest
-      # area on the diagram
-      imost <- which.max(tabulate(as.numeric(d$predominant)))
-      # take out that proteins
-      ispecies <- ispecies[-imost]
-    }
-  }
-  # close PNG plot device
-  dev.off()
-  # make animated GIF using ImageMagick
-  cat("anim.plasma: converting to animated GIF...\n")
-  outfile <- "plasma.gif"
-  syscmd <- paste("convert -loop 0 -delay 25 png/*.png png/", outfile, sep = "")
-  cat(paste(syscmd,"\n"))
-  if(.Platform$OS.type=="unix") sres <- system(syscmd)
-  else sres <- shell(syscmd)
-  if(sres==0) cat(paste("anim.plasma: animation is at png/",outfile,"\n",sep=""))
-  else {
-    cat("anim.plasma: error converting to animated GIF\n")
-    cat("anim.plasma: check that 'convert' tool from ImageMagick is in your PATH\n")
-  }
-}
-
 anim.carboxylase <- function(T=25:125,ntop=5,lcex=0.8,width=420,height=320) {
   # animate rank-activity diagrams over a temperature
   # and logaH2 gradient, or plot a single one for a single temperature
@@ -261,5 +200,3 @@
     }
   }
 }
-
-

Modified: pkg/CHNOSZ/R/examples.R
===================================================================
--- pkg/CHNOSZ/R/examples.R	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/R/examples.R	2017-02-23 13:52:07 UTC (rev 172)
@@ -12,7 +12,7 @@
     "util.seq", "util.units", "taxonomy", "info", "protein.info", "hkf", "water", "subcrt",
     "makeup", "basis", "swap.basis", "species", "affinity", "util.affinity", "equil.boltzmann", 
     "diagram", "buffer", "add.protein", "protein", "ionize.aa", "more.aa", "read.expr",
-    "objective", "revisit", "transfer", "anim", "EOSregress", "wjd")
+    "anim", "objective", "revisit", "transfer", "EOSregress", "wjd")
   plot.it <- FALSE
   if(is.character(do.png))
     png(paste(do.png,"%d.png",sep=""),width=500,height=500,pointsize=12)

Modified: pkg/CHNOSZ/demo/yeastgfp.R
===================================================================
--- pkg/CHNOSZ/demo/yeastgfp.R	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/demo/yeastgfp.R	2017-02-23 13:52:07 UTC (rev 172)
@@ -37,7 +37,7 @@
 inames <- 1:length(names)
 for(i in 1:length(nloc)) {
   diagram(a, normalize=TRUE, names=names[inames], groups=as.list(inames),
-    fill=fill[inames], cex.axis=0.75, cex.names=1)
+    fill=fill[inames], cex.axis=0.75, cex.names=1.2)
   label.plot(letters[i], xfrac=0.95, yfrac=0.9, paren=TRUE, italic=TRUE)
   title(main=paste(length(inames), "locations"))
   # take out the stable species

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/inst/NEWS	2017-02-23 13:52:07 UTC (rev 172)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.8-61 (2017-02-23)
+CHANGES IN CHNOSZ 1.0.8-62 (2017-02-23)
 ---------------------------------------
 
 DOCUMENTATION:

Deleted: pkg/CHNOSZ/inst/extdata/abundance/AA03.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/abundance/AA03.csv	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/inst/extdata/abundance/AA03.csv	2017-02-23 13:52:07 UTC (rev 172)
@@ -1,72 +0,0 @@
-type,description,log10(pg/ml),name,name2,note
-hemoglobin,Hemoglobin,11.21,HBA,HBB,
-plasma,Albumin,10.71,ALBU,,
-plasma,"IgG Total",10.09,IGHG1,"IGHG2,IGHG3,IGHG4",
-plasma,Transferrin,9.59,TRFE,,
-plasma,Fibrinogen,9.52,FIBA,"FIBB,FIBG","Fibrinogen alpha chain"
-plasma,"IgA Total",9.48,IGHA1,IGHA2,
-plasma,Alpha-2-Macroglobulin,9.48,A2MG,,
-plasma,"IgM Total",9.38,IGJ,,"Immunoglobulin J chain"
-plasma,Alpha-1-Antitrypsin,9.31,A1AT,,
-plasma,"C3 Complement",9.27,CO3,,
-plasma,Haptoglobin,9.27,HPT,,
-plasma,"Apolipoprotein A-1",9.21,APOA1,,
-plasma,"Apolipoprotein B",9.1,APOB,,"Apolipoprotein B-100"
-plasma,"Alpha-1-acid Glycoprotein",9.04,A1AG1,A1AG2,
-plasma,Lipoprotein(a),8.93,APOA,,Apolipoprotein(a)
-plasma,"Factor H",8.77,CFAH,,"Complement factor H"
-plasma,Ceruloplasmin,8.77,CERU,,
-plasma,"C4 Complement",8.72,CO4A,CO4B,
-plasma,"Complement Factor B",8.6,CFAB,,
-plasma,Prealbumin,8.6,TTHY,,Transthyretin
-plasma,"C9 Complement",8.56,CO9,,
-plasma,"C1q Complement",8.35,C1QA,"C1QB,C1QC",
-plasma,"C8 Complement",8.24,CO8B,CO8G,
-plasma,"C5 Complement",8.18,CO5,,
-plasma,Plasminogen,8.18,PLMN,,
-plasma,IgD,8.14,IGHD,,"Ig delta chain C region"
-plasma,"C1 Inhibitor",8.03,IC1,,
-plasma,"C6 Complement",8.03,CO6,,
-plasma,"C7 Complement",7.93,CO7,,
-plasma,"Complement Factor I",7.8,CFAI,,
-plasma,"Retinol Binding Protein",7.8,RET4,"RET1,RET2,RET3,RET5",
-plasma,iC3b,7.43,CO3.C3c,,"Complement C3c alpha' chain fragment 1?"
-plasma,"Thyroxin Binding Globulin",7.43,THBG,,"Thyroxine-binding globulin"
-plasma,"C2 Complement Protein",7.34,CO2,,
-plasma,"Thrombus Precursor Protein",6.72,THRB,,Prothrombin?
-plasma,"C-reactive Protein",6.68,CRP,,
-plasma,"Bb Fragment",6.13,CFAB.Bb,,
-tissue,"C3a Complement Protein",5.55,CO3.C3a,,"C3a anaphylatoxin"
-tissue,Ferritin,5.45,FRIL,FRIH,"Ferritin light chain"
-tissue,Rantes,5.45,CCL5,,"RANTES(3-68) cleaved from C-C motif chemokine 5"
-tissue,"SC5-b9 Complex",5.38,VTNC,,"Vitronectin is 'S-protein'; C5b-9 is complement"
-tissue,Myoglobin,4.86,MYG,,
-tissue,Thyroglobulin,4.76,THYG,,
-tissue,TPA,4.09,TPA,,"Tissue-type plasminogen activator"
-tissue,"C5a Complement",4.05,CO5.C5a,,"C5a anaphylatoxin"
-tissue,"Neuron-Specific Enolase",3.95,ENOG,,Gamma-enolase
-tissue,C-Peptide,3.94,INS.C,,"propeptide in insulin"
-tissue,Alpha-fetoprotein,3.74,FETA,,
-tissue,"TNF-Binding Proteins",3.57,TNR1A,,"Tumor necrosis factor receptor superfamily member 1A"
-tissue,"Prostate-Specific Antigen",3.57,KLK3,,
-tissue,"Prostatic Acid Phosphatase",3.46,PPAP,,
-tissue,CEA,3.42,CEAM5,,"Carcinoembryonic antigen-related cell adhesion molecule 5"
-tissue,"Myelin Basic Protein",3.42,MBP,,
-tissue,"Troponin I",3.25,TNNI1,TNNI2,"Troponin I, slow skeletal muscle"
-interleukin,Interleukin-1ra,3.15,IL1RA,,"Interleukin-1 receptor antagonist protein"
-interleukin,"MIP-1 beta",2.17,CCL4,,"cleaved from C-C motif chemokine 4"
-interleukin,"Troponin T",1.92,TNNT1,,
-interleukin,Interleukin-8,1.92,IL8,,
-interleukin,"MIP-1 alpha",1.8,CCL3,,"cleaved from C-C motif chemokine 3"
-interleukin,"Tissue Factor",1.75,TF,,
-interleukin,GCSF,1.69,CSF3,,"Granulocyte colony-stimulating factor"
-interleukin,"Interferon Alpha",1.59,IFNA1,"IFNA2,INFA4,IFNA8,INFA16","Interferon alpha-1/13"
-interleukin,Interleukin-2,1.42,IL2,,
-interleukin,Interleukin-4,1.42,IL4,,
-interleukin,TNF-Alpha,1.21,TNFA,,
-interleukin,"Interferon Gamma",1.21,IFNG,,
-interleukin,"Interleukin-1 Beta",1.1,IL1B,,
-interleukin,Interleukin-12,0.94,IL12A,IL12B,
-interleukin,Interleukin-10,0.83,IL10,,
-interleukin,Interleukin-5,0.83,IL5,,
-interleukin,Interleukin-6,0.62,IL6,,

Modified: pkg/CHNOSZ/man/CHNOSZ-package.Rd
===================================================================
--- pkg/CHNOSZ/man/CHNOSZ-package.Rd	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/man/CHNOSZ-package.Rd	2017-02-23 13:52:07 UTC (rev 172)
@@ -23,7 +23,6 @@
 By combining data taken from different sources, it is possible to build an inconsistent and/or nonsensical calculation.
 An attempt has been made to provide a primary database (OBIGT) that is internally consistent, but no guarantee can be made.
 If there is any doubt about the accuracy or suitability of data for a particular problem, please consult the primary sources (see \code{\link{thermo.refs}}).
-Examples without a reference (and some with references) demonstrate experimental features of CHNOSZ.
 }
 
 \section{Overview}{

Modified: pkg/CHNOSZ/man/affinity.Rd
===================================================================
--- pkg/CHNOSZ/man/affinity.Rd	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/man/affinity.Rd	2017-02-23 13:52:07 UTC (rev 172)
@@ -3,7 +3,7 @@
 \alias{affinity}
 \title{Chemical Affinities of Formation Reactions}
 \description{
-  Calculate the chemical affinities of formation reactions of species. Do it for single values of temperature, pressure, ionic strength and chemical activities of the basis species, or as a function of one or more of these variables. Or, return other properties including standard molal Gibbs energies of basis species and species of interest, and standard molal Gibbs energies, equilibrium constants and activity products of formation reactions. 
+Calculate the chemical affinities of formation reactions of species.
 }
 
 \usage{
@@ -14,59 +14,55 @@
 \arguments{
   \item{...}{numeric, zero or more named arguments, used to identify the variables of interest in the calculations}
   \item{property}{character, denoting the property to be calculated. Default is \samp{A}, for chemical affinity of formation reactions of species of interest}
-  \item{sout}{list, output from subcrt function}
-  \item{exceed.Ttr}{logical, allow subcrt to compute properties for phases beyond their transition temperature?}
-  \item{return.buffer}{logical. If \code{TRUE}, and a \code{\link{buffer}} has been associated with one or more basis species in the system, return the values of the activities of the basis species calculated using the buffer (it is not necessary in this case to have defined any species of interest). Default is \code{FALSE}}
-  \item{balance}{character. This argument is passed to \code{\link{buffer}} to identify a conserved basis species (or \samp{PBB}) in a chemical activity buffer. Default is \samp{PBB}}
+  \item{sout}{list, output from \code{\link{subcrt}}}
+  \item{exceed.Ttr}{logical, allow \code{\link{subcrt}} to compute properties for phases beyond their transition temperature?}
+  \item{return.buffer}{logical. If \code{TRUE}, and a \code{\link{buffer}} has been associated with one or more basis species in the system, return the values of the activities of the basis species calculated using the buffer (it is not necessary in this case to have defined any species of interest). Default is \code{FALSE}.}
+  \item{balance}{character. This argument is passed to \code{\link{buffer}} to identify a conserved basis species (or \samp{PBB}) in a chemical activity buffer. Default is \samp{PBB}.}
   \item{iprotein}{numeric, indices of proteins in \code{\link{thermo}$protein} for which to calculate properties}
   \item{loga.protein}{numeric, logarithms of activities of proteins identified in \code{iprotein}}
 }
 
 \details{
 \code{affinity} calculates the chemical affinities of reactions to form the species of interest from the basis species.
+The equation used to calculate chemical affinity \emph{A} is \emph{A}=\eqn{RT\ln (K/Q)}{RT*ln(K/Q)}, where \eqn{K} denotes the equilibrium constant of the reaction and \eqn{Q} stands for the activity product of the species in the reaction.
 The calculation of chemical affinities relies on the current definitions of the \code{\link{basis}} species and \code{\link{species}} of interest.
-It is possible to use the results of \code{affinity} to generate equilibrium activity diagrams using \code{\link{diagram}}.
+Calculations are possible at single values of temperature, pressure, ionic strength and chemical activities of the basis species, or as a function of one or more of these variables. 
 
-The equation used to calculate chemical affinity \emph{\bold{A}} is \emph{\bold{A}}=\eqn{RT\ln (K/Q)}{RT*ln(K/Q)} (Kondepudi and Prigogine, 1998), where \eqn{K} denotes the equilibrium constant of the reaction and \eqn{Q} stands for the activity product of the species in the reaction.
-(The equilibrium constant is related to standard Gibbs energy of reaction, \eqn{\Delta G^{\circ}_r}{DeltaG0r}, by \eqn{\Delta G^{\circ}_r = -2.303RT\log K}{DeltaG0r = -2.303*RT*logK}, where \eqn{R} and \eqn{T} stand for, respectively, the gas constant and temperature).
-With the approach of a given reaction to a state of equilibrium, the chemical affinity tends toward zero, or \eqn{K = Q}. 
-
-Valid properties are \samp{A} or NULL for chemical affinity, \samp{logK} or \samp{logQ} for logarithm of equilibrium constant and reaction activity product, or any of the properties available in \code{\link{subcrt}} except for \samp{rho}.
-The properties returned are those of the formation reactions of the species of interest from the basis species.
-It is also possible to calculate the properties of the species of interest themselves (not their formation reactions) by setting the \code{property} to \samp{G.species}, \samp{Cp.species}, etc.
-Except for \samp{A}, the properties of proteins or their reactions calculated in this manner are restricted to nonionized proteins.
-
 Zero, one, or more leading arguments to the function identify which of the chemical activities of basis species, temperature, pressure and/or ionic strength to vary.
 The names of each of these arguments may be the formula of any of the basis species of the system, or \samp{T}, \samp{P}, \samp{pe}, \samp{pH}, \samp{Eh}, or \samp{IS} (but names may not be repeated).
-To use the names of charged basis species such as \samp{K+} and \samp{SO4-2} as the arguments, they should be enclosed in quotes (see the example for aluminum speciation in \code{\link{diagram}}).
-The value of each argument is of the form \code{c(min,max)} or \code{c(min,max,res)} where \code{min} and \code{max} refer to the minimimum and maximum values of variable identified by the name of the argument, and \code{res} denotes the resolution, or number of points along which to do the calculations (this is assigned a default value of 128 if it is missing).
-For any arguments that refer to basis species, the numerical values are the logarithms of the activities of that basis species, or logarithms of fugacities if it is a gas.
-Unlike the \code{energy} function, the units of \samp{T} and \samp{P} in \code{affinity} are those the user has set using \code{\link{T.units}} and \code{\link{P.units} }(on program start-up these are \eqn{^{\circ}}{°}C and bar, respectively). 
+The names charged basis species such as \samp{K+} and \samp{SO4-2} should be quoted when used as arguments.
+The value of each argument is of the form \code{c(min, max)} or \code{c(min, max, res)} where \code{min} and \code{max} refer to the minimimum and maximum values of variable identified by the name of the argument, and \code{res} denotes the resolution, or number of points along which to do the calculations; \code{red} is assigned a default value of 128 if it is missing.
+For any arguments that refer to basis species, the numerical values are the logarithms of activity (or fugacity for gases) of that basis species.
+The units of \samp{T} and \samp{P} in \code{affinity} are those the user has set using \code{\link{T.units}} and \code{\link{P.units} }(on program start-up these are \eqn{^{\circ}}{°}C and bar, respectively). 
 
 If one or more buffers are assigned to the definition of \code{\link{basis}} species, \code{affinity} calls \code{\link{buffer}} to calculate the logarithms of activities of these basis species from the buffer.
 
 The \code{iprotein} and \code{loga.protein} arguments can be used to compute the chemical affinities of formation reactions of proteins that are not in the current \code{\link{species}} definition.
-This approach can be utilized in order to calculate the properties of many proteins in a fraction of the time it would take to calculate them individually.
-The appropriate \code{\link{basis}} species still must be defined prior to calling \code{affinity}.
-\code{iprotein} contains indices of desired proteins in \code{\link{thermo}$protein}; \code{affinity} adds to the species list the amino acid residues and and terminal H2O group (indicated by \dQuote{RESIDUE} in \code{thermo$protein}) then calculates the properties of the reactions for the residues and terminal group, including ionization effects, and adds them together to get those of the indicated proteins.
+\code{iprotein} contains the indices (rownumbers) of desired proteins in \code{\link{thermo}$protein}.
+This uses some optimizations to calculate the properties of many proteins in a fraction of the time it would take to calculate them individually.
 
-In CHNOSZ version 0.9, \code{energy} gained a new argument \samp{transect} which is set to TRUE by \code{energy.args} when the length(s) of the variables is(are) greater than three.
+When the length(s) of the variables is(are) greater than 3, the function enters the \samp{transect} mode of operation (see \code{\link{energy}}).
 In this mode of operation, instead of performing the calculations on an \eqn{n}{n}-dimensional grid, the affinities are calculated on a transect of changing T, P, and/or chemical activity of basis species.
+
+The function can also be used to calculate other thermodynamic properties of formation reactions. 
+Valid properties are \samp{A} or NULL for chemical affinity, \samp{logK} or \samp{logQ} for logarithm of equilibrium constant and reaction activity product, or any of the properties available in \code{\link{subcrt}} except for \samp{rho}.
+The properties returned are those of the formation reactions of the species of interest from the basis species.
+It is also possible to calculate the properties of the species of interest themselves (not their formation reactions) by setting the \code{property} to \samp{G.species}, \samp{Cp.species}, etc.
+Except for \samp{A}, the properties of proteins or their reactions calculated in this manner are restricted to nonionized proteins.
 }
 
 \value{
-For \code{affinity}, a list, elements of which are \code{sout} output from \code{\link{subcrt}}, \code{property} name of the calculated property (\samp{A} for chemical affinity), \code{basis} and \code{species} definition of basis species and species of interest in effect at runtime, \code{T} and \code{P} temperature and pressure, in the system units of Kelvin and bar, set to \code{numeric()} (length=0) if either one is a variable, \code{vars} the names of the variables, \code{vals} the values of the variables (a list, one element for each variable), \code{values} the result of the calculation (a list, one element for each species, with names taken from the species index in \code{\link{thermo}$obigt}).
+A list, elements of which are \code{sout} output from \code{\link{subcrt}}, \code{property} name of the calculated property (\samp{A} for chemical affinity), \code{basis} and \code{species} definition of basis species and species of interest in effect at runtime, \code{T} and \code{P} temperature and pressure, in the system units of Kelvin and bar, set to \code{numeric()} (length=0) if either one is a variable, \code{vars} the names of the variables, \code{vals} the values of the variables (a list, one element for each variable), \code{values} the result of the calculation (a list, one element for each species, with names taken from the species index in \code{\link{thermo}$obigt}).
 The elements of the lists in \code{vals} and \code{values} are arrays of \eqn{n}{n} dimensions, where \eqn{n}{n} is the number of variables.
-The values of chemical affinity of formation reactions of the species are returned in dimensionless units (for use with decimal logarithms, i.e., \emph{\strong{A}}/\eqn{2.303RT}).
+The values of chemical affinity of formation reactions of the species are returned in dimensionless units (for use with decimal logarithms, i.e., \emph{A}/\eqn{2.303RT}).
 
-Names other than \samp{T} or \samp{P} in \code{vars} generally refer to basis species, and the corresponding \code{vals} are the logarithms of activity or fugacity. However, if one or more of \code{pe}, \code{Eh} or \code{pH} is among the variables of interest, \code{vals} holds the values of the those variables as indicated.
+Names other than \samp{T} or \samp{P} in \code{vars} generally refer to basis species, and the corresponding \code{vals} are the logarithms of activity or fugacity.
+However, if one or more of \code{pe}, \code{Eh} or \code{pH} is among the variables of interest, \code{vals} holds the values of the those variables as indicated.
 }
 
 \seealso{
-Usually, \code{\link{equilibrate}} is the next step in calculations of chemical equilibrium.
-The help for \code{\link{buffer}} has some examples of using chemical activity buffers.
-The guts of the calculations provided by \code{affinity} involve \code{\link{energy.args}} and \code{\link{energy}}, which normally are not part of the user interaction.
-Longer examples are in \code{demo{affinity}}.
+\code{\link{equilibrate}} for calculating of equilibrium activities of species, and \code{\link{diagram}} for plotting the results.
+The guts of the calculations involve \code{\link{energy.args}} and \code{\link{energy}}, which are not intended for normal user interaction.
 }
 
 \examples{
@@ -93,10 +89,7 @@
 }
 
 \references{
-  Helgeson, H. C., Richard, L, McKenzie, W. F., Norton, D. L. and Schmitt, A. (2009) A chemical and thermodynamic model of oil generation in hydrocarbon source rocks. \emph{Geochim. Cosmochim. Acta} \bold{73}, 594--695. \url{http://dx.doi.org/10.1016/j.gca.2008.03.004}
-
-  Kondepudi, D. K. and Prigogine, I. (1998) \emph{Modern Thermodynamics: From Heat Engines to Dissipative Structures}, John Wiley & Sons, New York, 486 p. \url{http://www.worldcat.org/oclc/38055900}
+Helgeson, H. C., Richard, L, McKenzie, W. F., Norton, D. L. and Schmitt, A. (2009) A chemical and thermodynamic model of oil generation in hydrocarbon source rocks. \emph{Geochim. Cosmochim. Acta} \bold{73}, 594--695. \url{http://dx.doi.org/10.1016/j.gca.2008.03.004}
 }
 
-
 \concept{Primary thermodynamic modeling}

Modified: pkg/CHNOSZ/man/anim.Rd
===================================================================
--- pkg/CHNOSZ/man/anim.Rd	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/man/anim.Rd	2017-02-23 13:52:07 UTC (rev 172)
@@ -2,7 +2,6 @@
 \name{anim.TCA}
 \alias{anim}
 \alias{anim.TCA}
-\alias{anim.plasma}
 \alias{anim.carboxylase}
 \title{Functions to Make Animations}
 \description{
@@ -12,7 +11,6 @@
 \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)
 }
 
@@ -29,16 +27,22 @@
 }
 
 \details{
-  These functions create a series of PNG figures that can be converted into an animated diagram. The PNG files are created in the \samp{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 \samp{convert} tool from the ImageMagick software distribution (\url{http://www.imagemagick.org}), if it is available on the system. The system command is called using the \code{\link{system}} function on unix-alikes, and using \code{shell} on Windows platforms. When installing ImageMagick on Windows, be sure to leave the \sQuote{Add application directory to your system path} option checked; this will make the \samp{convert} command from ImageMagick available in the shell.
+These functions create a series of PNG figures that can be converted into an animated diagram.
+The PNG files are created in the \samp{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 \samp{convert} tool from the ImageMagick software distribution (\url{http://www.imagemagick.org}), if it is available on the system.
+The system command is called using \code{\link{system}}, or \code{shell} on Windows platforms.
+When installing ImageMagick on Windows, be sure to leave the \sQuote{Add application directory to your system path} option checked; this will make the \samp{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 \code{data(thermo)}.
+To ensure the calculations are performed as intended, each function first removes any existing system definition by calling \code{data(thermo)}.
 
-  \code{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 \code{redox} to \code{list(H2=c(-20,0))} to draw a logaH2O - logaH2 diagram. The diagrams are made at 25 \eqn{^{\circ}}{°}C unless \code{high.T} is TRUE, in which case high-temperature (100 \eqn{^{\circ}}{°}C) stability fields are overlain. The number of frames to be used for the animation (as pH increases ranges between the values specified in \code{pHlim}) is given by \code{nframes}.
+\code{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 \code{redox} to \code{list(H2=c(-20,0))} to draw a logaH2O - logaH2 diagram.
+The diagrams are made at 25 \eqn{^{\circ}}{°}C unless \code{high.T} is TRUE, in which case high-temperature (100 \eqn{^{\circ}}{°}C) stability fields are overlaid.
 
-  \code{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 \eqn{^{\circ}}{°}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 \code{\link{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 \code{\link{heat.colors}} indicates the reported reference abundances of the proteins, with the deepest (reddest) colors corresponding to the highest abundances.
-
-  \code{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 \code{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 \eqn{\log a_{\mathrm{H_{2}}_{\left(aq\right)}}=-11+3/\left(40\times T\left(^{\circ}C\right)\right)}{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).
-
+\code{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 \code{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 \eqn{\log a_{\mathrm{H_{2}}_{\left(aq\right)}}=-11+3/\left(40\times T\left(^{\circ}C\right)\right)}{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).
 }
 
 \examples{\dontshow{data(thermo)}
@@ -53,11 +57,7 @@
 }
 
 \references{
-
-  Anderson, N. L. and Anderson, N. G. (2003) The human plasma proteome: History, character and diagnostic prospects (Vol. 1 (2002) 845-867). \emph{Molecular and Cellular Proteomics} \bold{2}, 50. \url{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. \emph{PLoS ONE} \bold{6}, e22782. \url{http://dx.doi.org/10.1371/journal.pone.0022782}
-
+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. \emph{PLoS ONE} \bold{6}, e22782. \url{http://dx.doi.org/10.1371/journal.pone.0022782}
 }
 
 \concept{Extra thermodynamic modeling}

Modified: pkg/CHNOSZ/man/extdata.Rd
===================================================================
--- pkg/CHNOSZ/man/extdata.Rd	2017-02-23 11:45:38 UTC (rev 171)
+++ pkg/CHNOSZ/man/extdata.Rd	2017-02-23 13:52:07 UTC (rev 172)
@@ -13,7 +13,6 @@
   Files in \code{abundance} contain protein abundance and microbial occurrence data:
   \itemize{
     \item \code{stress} is a data frame listing proteins identified in selected proteomic stress response experiments. The names of proteins begin at row 3, and columns are all the same length (padded as necessary at the bottom by \code{NA}s). Names correspond to ordered locus names (for \samp{Sce}) or gene names (for \samp{Eco}). The column names identify the experiments, the first row contains the name of the organism (\samp{Sce} or \samp{Eco}) and the third row has the reference key for the source of the data (listed in \code{\link{thermo}$refs}).
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/chnosz -r 172


More information about the CHNOSZ-commits mailing list