[CHNOSZ-commits] r197 - in pkg/CHNOSZ: . R inst man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 3 11:45:02 CEST 2017


Author: jedick
Date: 2017-05-03 11:45:02 +0200 (Wed, 03 May 2017)
New Revision: 197

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/basis.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/man/basis.Rd
   pkg/CHNOSZ/man/palply.Rd
   pkg/CHNOSZ/vignettes/anintro.Rmd
Log:
preset.basis(): add 'QEC4' keyword


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2017-05-03 02:39:19 UTC (rev 196)
+++ pkg/CHNOSZ/DESCRIPTION	2017-05-03 09:45:02 UTC (rev 197)
@@ -1,6 +1,6 @@
 Date: 2017-05-03
 Package: CHNOSZ
-Version: 1.0.8-85
+Version: 1.0.8-86
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/R/basis.R
===================================================================
--- pkg/CHNOSZ/R/basis.R	2017-05-03 02:39:19 UTC (rev 196)
+++ pkg/CHNOSZ/R/basis.R	2017-05-03 09:45:02 UTC (rev 197)
@@ -178,7 +178,7 @@
 # to load a preset basis definition by keyword
 preset.basis <- function(key=NULL) {
   # the available keywords
-  basis.key <- c("CHNOS", "CHNOS+", "CHNOSe", "CHNOPS+", "MgCHNOPS+", "FeCHNOS", "FeCHNOS+", "QEC", "QEC+")
+  basis.key <- c("CHNOS", "CHNOS+", "CHNOSe", "CHNOPS+", "MgCHNOPS+", "FeCHNOS", "FeCHNOS+", "QEC4", "QEC", "QEC+")
   # just list the keywords if none is specified
   if(is.null(key)) return(basis.key)
   # delete any previous basis definition
@@ -193,10 +193,12 @@
   else if(ibase==5) species <- c("Mg+2", "CO2", "H2O", "NH3", "H3PO4", "H2S", "e-", "H+")
   else if(ibase==6) species <- c("Fe2O3", "CO2", "H2O", "NH3", "H2S", "oxygen")
   else if(ibase==7) species <- c("Fe2O3", "CO2", "H2O", "NH3", "H2S", "oxygen", "H+")
-  else if(ibase==8) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen")
-  else if(ibase==9) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen", "H+")
+  else if(ibase %in% c(8, 9)) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen")
+  else if(ibase==10) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen", "H+")
   # get the preset logact
   logact <- preset.logact(species)
+  # for QEC4, we use logact = -4 for the amino acids
+  if(key=="QEC4") logact[1:3] <- -4
   # load the species and return the result
   return(basis(species, logact))
 }

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2017-05-03 02:39:19 UTC (rev 196)
+++ pkg/CHNOSZ/inst/NEWS	2017-05-03 09:45:02 UTC (rev 197)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.8-85 (2017-05-03)
+CHANGES IN CHNOSZ 1.0.8-86 (2017-05-03)
 ---------------------------------------
 
 DOCUMENTATION:

Modified: pkg/CHNOSZ/man/basis.Rd
===================================================================
--- pkg/CHNOSZ/man/basis.Rd	2017-05-03 02:39:19 UTC (rev 196)
+++ pkg/CHNOSZ/man/basis.Rd	2017-05-03 09:45:02 UTC (rev 197)
@@ -29,7 +29,6 @@
 Alternatively, the first argument may consist of numeric values indicating the species indices (rownumbers in \code{\link{thermo}$obigt}), but a mixture of character and numeric values will generate an error.
 The special names \samp{pH}, \samp{pe} and \samp{Eh} can be included in the \code{species} argument; they get translated into the names of the proton (\samp{H+}) and electron (\samp{e-}) as appropriate.
 
-
 The physical states or logarithms of activities of species in the basis definition can be changed by calling \code{basis} with the formulas of species that are in the basis set, or their species indices.
 If either of the second or third arguments to \code{basis} is of type character, it refers to the name of a state (if present in \code{thermo$obigt$state}) or to the name of a chemical activity \code{\link{buffer}} (if present in \code{thermo$buffers$name}).
 If either of these arguments is numeric it specifies the logarithms of activities (or fugacities for gases) of the basis species.
@@ -49,7 +48,7 @@
 
   \tabular{ll}{
     \code{CHNOS} \tab \eqn{\mathrm{CO_2}}{CO2}, \eqn{\mathrm{H_2O}}{H2O}, \eqn{\mathrm{NH_3}}{NH3}, 
-                      \eqn{\mathrm{H_2S}}{H2S}, \eqn{\mathrm{O_2}}{O2} \cr
+                      \eqn{\mathrm{H_2S}}{H2S}, \eqn{\mathrm{O_2}}{O2} (basis I in Dick, 2016)\cr
     \code{CHNOS+} \tab \eqn{\mathrm{CO_2}}{CO2}, \eqn{\mathrm{H_2O}}{H2O}, \eqn{\mathrm{NH_3}}{NH3}, 
                        \eqn{\mathrm{H_2S}}{H2S}, \eqn{\mathrm{O_2}}{O2}, \eqn{\mathrm{H^+}}{H+} \cr
     \code{CHNOSe} \tab \eqn{\mathrm{CO_2}}{CO2}, \eqn{\mathrm{H_2O}}{H2O}, \eqn{\mathrm{NH_3}}{NH3}, 
@@ -63,10 +62,12 @@
                         \eqn{\mathrm{NH_3}}{NH3}, \eqn{\mathrm{H_2S}}{H2S}, \eqn{\mathrm{O_2}}{O2} \cr
     \code{FeCHNOS+} \tab \eqn{\mathrm{Fe_2O_3}}{Fe2O3}, \eqn{\mathrm{CO_2}}{CO2}, \eqn{\mathrm{H_2O}}{H2O}, 
                          \eqn{\mathrm{NH_3}}{NH3}, \eqn{\mathrm{H_2S}}{H2S}, \eqn{\mathrm{O_2}}{O2}, \eqn{\mathrm{H^+}}{H+} \cr
+    \code{QEC4} \tab cysteine, glutamic acid, glutamine, \eqn{\mathrm{H_2O}}{H2O}, \eqn{\mathrm{O_2}}{O2} (basis II in Dick, 2016) \cr
     \code{QEC} \tab cysteine, glutamic acid, glutamine, \eqn{\mathrm{H_2O}}{H2O}, \eqn{\mathrm{O_2}}{O2} \cr
     \code{QEC+} \tab cysteine, glutamic acid, glutamine, \eqn{\mathrm{H_2O}}{H2O}, \eqn{\mathrm{O_2}}{O2}, \eqn{\mathrm{H^+}}{H+} \cr
   }
 
+The logarithms of activities of amino acids in the \samp{QEC4} basis are -4; those in \samp{QEC} and \samp{QEC+} are set to approximate concentrations in human plasma (see Dick, 2017).
 }
 
 \value{
@@ -84,6 +85,12 @@
   \code{\link{species}} for setting up the formation reactions from basis species. 
 }
 
+\references{
+Dick, J. M. (2016) Proteomic indicators of oxidation and hydration state in colorectal cancer. \emph{PeerJ} \bold{4}:e2238. \url{http://dx.doi.org/10.7717/peerj.2238}
+
+Dick, J. M. (2017) Chemical composition and the potential for proteomic transformation in cancer, hypoxia, and hyperosmotic stress. \emph{bioRxiv} \url{https://doi.org/10.1101/097667}
+}
+
 \examples{
 \dontshow{data(thermo)}
 ## define basis species

Modified: pkg/CHNOSZ/man/palply.Rd
===================================================================
--- pkg/CHNOSZ/man/palply.Rd	2017-05-03 02:39:19 UTC (rev 196)
+++ pkg/CHNOSZ/man/palply.Rd	2017-05-03 09:45:02 UTC (rev 197)
@@ -26,7 +26,7 @@
 
 \seealso{
 \code{\link{read.fasta}}, \code{\link{count.aa}}, \code{\link{affinity}}, \code{\link{equil.boltzmann}} and \code{\link{equil.reaction}} for functions that use \code{palply}.
-Tests are in \file{tests/test-util.program.R}, and a \dQuote{real life} example is in \file{demos/density.R}.
+Tests are in \file{tests/test-util.program.R}, and a \dQuote{real world} example is in \file{demos/density.R}.
 }
 
 \keyword{utilities}

Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd	2017-05-03 02:39:19 UTC (rev 196)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd	2017-05-03 09:45:02 UTC (rev 197)
@@ -97,7 +97,7 @@
 # First steps
 
 This document introduces the usage of CHNOSZ, a package for the [R software environment](http://r-project.org).
-For more information on R, see "[An Introduction to R](http://cran.r-project.org/manuals.html)" and the [contributed documentation](https://cran.r-project.org/other-docs.html) for R.
+For more information on R, see "[An Introduction to R](https://cran.r-project.org/manuals.html)" and the [contributed documentation](https://cran.r-project.org/other-docs.html) for R.
 
 CHNOSZ has been developed since 2006 as a tool for thermodynamic calculations in geochemistry and compositional biology.
 The package provides functions and a thermodynamic database that can be used to calculate the stoichiometric and energetic properties of reactions involving minerals and inorganic and/or organic aqueous species.
@@ -1513,7 +1513,7 @@
 
 ## Activity coefficients
 
-<span style="color:green">`nonideal()`</span> uses the Debye--Hückel equation, described in Chapter 3 of @Alb03, to calculate activity coefficients of charged species.
+<span style="color:green">`nonideal()`</span> uses the extended Debye--Hückel equation, described in Chapter 3 of @Alb03, to calculate activity coefficients of charged species.
 The calculations can be invoked by setting the `IS` argument in <span style="color:green">`subcrt()`</span> or <span style="color:green">`affinity()`</span>.
 The activity coefficients are calculated as a function of ionic strength (*I*), temperature, and charge of each species, without any other species-specific parameters.
 Due to these assumptions, as well as the limited applicability of the implemented equations to very high *I* and/or *T*, <span style="color:green">`nonideal()`</span> is presented as an experimental feature.



More information about the CHNOSZ-commits mailing list