[CHNOSZ-commits] r196 - in pkg/CHNOSZ: . R data inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 3 04:39:21 CEST 2017


Author: jedick
Date: 2017-05-03 04:39:19 +0200 (Wed, 03 May 2017)
New Revision: 196

Added:
   pkg/CHNOSZ/R/palply.R
   pkg/CHNOSZ/man/palply.Rd
Removed:
   pkg/CHNOSZ/R/util.program.R
   pkg/CHNOSZ/man/util.program.Rd
Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/util.args.R
   pkg/CHNOSZ/data/thermo.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/man/data.Rd
   pkg/CHNOSZ/man/diagram.Rd
   pkg/CHNOSZ/man/extdata.Rd
   pkg/CHNOSZ/man/findit.Rd
   pkg/CHNOSZ/man/info.Rd
   pkg/CHNOSZ/man/nonideal.Rd
   pkg/CHNOSZ/man/read.expr.Rd
   pkg/CHNOSZ/man/species.Rd
   pkg/CHNOSZ/man/subcrt.Rd
   pkg/CHNOSZ/man/transfer.Rd
   pkg/CHNOSZ/man/util.array.Rd
   pkg/CHNOSZ/man/util.blast.Rd
   pkg/CHNOSZ/man/util.expression.Rd
   pkg/CHNOSZ/man/util.fasta.Rd
   pkg/CHNOSZ/man/util.misc.Rd
   pkg/CHNOSZ/man/util.plot.Rd
Log:
minor documentation changes #3


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

Copied: pkg/CHNOSZ/R/palply.R (from rev 195, pkg/CHNOSZ/R/util.program.R)
===================================================================
--- pkg/CHNOSZ/R/palply.R	                        (rev 0)
+++ pkg/CHNOSZ/R/palply.R	2017-05-03 02:39:19 UTC (rev 196)
@@ -0,0 +1,26 @@
+# CHNOSZ/palply.R
+
+palply <- function(varlist, X, FUN, ...) {
+  # a wrapper function to run parLapply if length(X) >= thermo$opt$paramin
+  # and package 'parallel' is available, otherwise run lapply
+  if(length(X) >= get("thermo")$opt$paramin) {
+    # Use option mc.cores to choose an appropriate cluster size.
+    # and set max at 2 for now (per CRAN policies)
+    nCores <- min(getOption("mc.cores"), 2)
+    # don't load methods package, to save startup time - ?makeCluster
+    cl <- parallel::makeCluster(nCores, methods=FALSE)
+    # export the variables and notify the user
+    if(! "" %in% varlist) {
+      parallel::clusterExport(cl, varlist)
+      message(paste("palply:", caller.name(4), "running", length(X), "calculations on",
+        nCores, "cores with variable(s)", paste(varlist, collapse=", ")))
+    } else {
+      message(paste("palply:", caller.name(4), "running", length(X), "calculations on",
+        nCores, "cores"))
+    }
+    # run the calculations
+    out <- parallel::parLapply(cl, X, FUN, ...)
+    parallel::stopCluster(cl)
+  } else out <- lapply(X, FUN, ...)
+  return(out)
+}

Modified: pkg/CHNOSZ/R/util.args.R
===================================================================
--- pkg/CHNOSZ/R/util.args.R	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/R/util.args.R	2017-05-03 02:39:19 UTC (rev 196)
@@ -1,5 +1,5 @@
 # CHNOSZ/util.args.R
-# functions to create argument lists
+# functions to create argument lists and get name of calling function
 
 ### unexported functions ###
 
@@ -72,3 +72,19 @@
   }
   return(state)
 }
+
+caller.name <- function(n=2) {
+  # returns the name of the calling function n frames up
+  # (n=2: the caller of the function that calls this one)
+  # or character() if called interactively
+  if(sys.nframe() < n) name <- character()
+  else {
+    sc <- sys.call(-n)[[1]]
+    name <- try(as.character(sc),silent=TRUE)
+    # also return character() if the value from sys.call is
+    # the function itself (why does this sometimes happen,
+    # e.g. when called from affinity()?)
+    if(class(name)=="try-error") name <- character()
+  }
+  return(name)
+}

Deleted: pkg/CHNOSZ/R/util.program.R
===================================================================
--- pkg/CHNOSZ/R/util.program.R	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/R/util.program.R	2017-05-03 02:39:19 UTC (rev 196)
@@ -1,45 +0,0 @@
-# CHNOSZ/util.program.R
-# various programming-related functions
-
-palply <- function(varlist, X, FUN, ...) {
-  # a wrapper function to run parLapply if length(X) >= thermo$opt$paramin
-  # and package 'parallel' is available, otherwise run lapply
-  if(length(X) >= get("thermo")$opt$paramin) {
-    # Use option mc.cores to choose an appropriate cluster size.
-    # and set max at 2 for now (per CRAN policies)
-    nCores <- min(getOption("mc.cores"), 2)
-    # don't load methods package, to save startup time - ?makeCluster
-    cl <- parallel::makeCluster(nCores, methods=FALSE)
-    # export the variables and notify the user
-    if(! "" %in% varlist) {
-      parallel::clusterExport(cl, varlist)
-      message(paste("palply:", caller.name(4), "running", length(X), "calculations on",
-        nCores, "cores with variable(s)", paste(varlist, collapse=", ")))
-    } else {
-      message(paste("palply:", caller.name(4), "running", length(X), "calculations on",
-        nCores, "cores"))
-    }
-    # run the calculations
-    out <- parallel::parLapply(cl, X, FUN, ...)
-    parallel::stopCluster(cl)
-  } else out <- lapply(X, FUN, ...)
-  return(out)
-}
-
-### unexported functions ###
-
-caller.name <- function(n=2) {
-  # returns the name of the calling function n frames up
-  # (n=2: the caller of the function that calls this one)
-  # or character() if called interactively
-  if(sys.nframe() < n) name <- character()
-  else {
-    sc <- sys.call(-n)[[1]]
-    name <- try(as.character(sc),silent=TRUE)
-    # also return character() if the value from sys.call is
-    # the function itself (why does this sometimes happen,
-    # e.g. when called from affinity()?)
-    if(class(name)=="try-error") name <- character()
-  }
-  return(name)
-}

Modified: pkg/CHNOSZ/data/thermo.R
===================================================================
--- pkg/CHNOSZ/data/thermo.R	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/data/thermo.R	2017-05-03 02:39:19 UTC (rev 196)
@@ -31,7 +31,6 @@
     groups = read.csv("groups.csv", row.names=1, check.names=FALSE),
     basis = NULL,
     species = NULL,
-    Psat = NULL,
     opar = NULL
   )
   # place it in CHNOSZ environment

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/inst/NEWS	2017-05-03 02:39:19 UTC (rev 196)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.8-84 (2017-05-02)
+CHANGES IN CHNOSZ 1.0.8-85 (2017-05-03)
 ---------------------------------------
 
 DOCUMENTATION:

Modified: pkg/CHNOSZ/man/data.Rd
===================================================================
--- pkg/CHNOSZ/man/data.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/data.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -58,7 +58,7 @@
 
     \item \code{thermo$element}
   Dataframe containing the thermodynamic properties of elements taken from Cox et al., 1989 and Wagman et al., 1982.
-  The standard molal entropy (\eqn{S}(\code{Z})) at 25 \eqn{^{\circ}}{°}C and 1 bar for the element of charge (\code{Z}) was calculated from \eqn{S}(H2,g) + 2\eqn{S}(\code{Z}) =  2\eqn{S}(H+), where the standard molal entropies of H2,g and H+ were taken from Cox et al., 1989.
+  The standard molal entropy (\eqn{S}(\code{Z})) at 25 \eqn{^{\circ}}{°}C and 1 bar for the \dQuote{element} of charge (\code{Z}) was calculated from \eqn{S}(H2,g) + 2\eqn{S}(\code{Z}) =  2\eqn{S}(H+), where the standard molal entropies of H2,g and H+ were taken from Cox et al., 1989.
   The mass of \code{Z} is taken to be zero.
   Accessing this data frame using \code{\link{mass}} or \code{\link{entropy}} will select the first entry found for a given element; i.e., values from Wagman et al., 1982 will only be retrieved if the properties of the element are not found from Cox et al., 1989.
       \tabular{lll}{
@@ -83,7 +83,7 @@
   } 
 
   \samp{OrganoBioGeoTherm} is the name of a GUI program to use SUPCRT in Windows, produced in Harold C. Helgeson's Laboratory of Theoretical Geochemistry and Biogeochemistry at the University of California, Berkeley.
-  The \acronym{OBIGT} database was originally developed for that program, but has been ported to CHNOSZ, with additional modifications.
+  The \acronym{OBIGT} database was originally developed for that program, and has been ported to CHNOSZ, with additional modifications.
   There may be an additional meaning for the acronym: \dQuote{One BIG Table} of thermodynamic data.
 
   Each entry is referenced to one or two literature sources listed in \code{thermo$refs}.
@@ -158,8 +158,8 @@
       \code{key} \tab character \tab Source key\cr
       \code{author} \tab character \tab Author(s)\cr
       \code{year} \tab character \tab Year\cr
-      \code{note} \tab character \tab Short description of the compounds or species in this data source\cr
       \code{citation} \tab character \tab Citation (journal title, volume, and article number or pages; or book or report title)\cr
+      \code{note} \tab character \tab Short description of the compounds or species in this data source\cr
       \code{URL} \tab character \tab URL\cr
     }
 
@@ -208,18 +208,7 @@
        \code{name} \tab character \tab Name of species\cr
     }
 
-    \item \code{thermo$water}
-    The properties calculated with \code{\link{water}} at multiple T, P points (minimum of 26) are stored here so that repeated calculations at the same conditions can be done more quickly.
-
-    \item \code{thermo$Psat}
-    The values of Psat calculated with \code{water.SUPCRT} at multiple T points (minimum of 26) are stored here.
-
-    \item \code{thermo$water2}
-    The properties calculated with \code{water.SUPCRT} at multiple T, P points (minimum of 26) are stored here.
-
-
   }  % end of itemize with long descriptions
-     
 
 } % end of format
 

Modified: pkg/CHNOSZ/man/diagram.Rd
===================================================================
--- pkg/CHNOSZ/man/diagram.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/diagram.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -122,7 +122,7 @@
 In cases where it applies (see Warning), the maximum affinity method is much faster than an equilibrium calculation.
 \code{balance} is the option that determines the balancing coefficients (this argument has no effect on the calculations of equilibrium activities.)
 If \code{what} is the name of a basis species, it refers to option (2) above.
-A contour plot is made in the case of 2-D diagrams of the equilibrium activity of a basis species (see \code{\link{demos}("CO2Ac")}, and only the first species of interest is used in the calculation; a warning is produced if there is more than one.
+A contour plot is made in the case of 2-D diagrams of the equilibrium activity of a basis species (see the CO2-acetic acid example in \code{\link{buffer}}, and only the first species of interest is used in the calculation; a warning is produced if there is more than one.
 
 A different incarnation of 1-D speciation diagrams is provided by \code{strip}.
 This function generates any number of strip diagrams in a single plot.

Modified: pkg/CHNOSZ/man/extdata.Rd
===================================================================
--- pkg/CHNOSZ/man/extdata.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/extdata.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -14,8 +14,8 @@
   \itemize{
     \item \code{TBD+05.csv} lists genes with transcriptomic expression changes in carbon limitation stress response experiments in yeast (Tai et al., 2005). See \code{\link{read.expr}} for an example that uses this file.
     \item \code{ISR+08.csv} has columns excerpted from Additional File 2 of Ishihama et al. (2008) for protein abundances in \emph{E. coli} cytosol. The columns in this file are ID (Swiss-Prot ID), accession (Swiss-Prot accession), emPAI (exponentially modified protein abundance index), copynumber (emPAI-derived copy number/cell), GRAVY (Kyte-Doolittel), FunCat (FunCat class description), PSORT (PSORT localisation), ribosomal (yes/no). See \code{\link{read.expr}} for an example that uses this file.
-    \item \code{yeastgfp.csv.xz} Has 28 columns; the names of the first five are \code{yORF}, \code{gene name}, \code{GFP tagged?}, \code{GFP visualized?}, and \code{abundance}. The remaining columns correspond to the 23 subcellular localizations considered in the YeastGFP project (Huh et al., 2003 and Ghaemmaghami et al., 2003) and hold values of either \code{T} or \code{F} for each protein. \samp{yeastgfp.csv} was downloaded on 2007-02-01 from http://yeastgfp.ucsf.edu using the Advanced Search, setting options to download the entire dataset and to include localization table and abundance, sorted by orf number. See \code{\link{yeastgfp}} and \code{\link{demos}("yeastgfp")} for examples that use this file.
-    \item \code{microbes.csv} has data for microbial occurrence (i.e. relative enrichement) in colorectal cancer and normal tissue. The file is from the Supporting Information of Dick (2016). This file is used by \code{\link{demos}("bugstab")}.
+    \item \code{yeastgfp.csv.xz} Has 28 columns; the names of the first five are \code{yORF}, \code{gene name}, \code{GFP tagged?}, \code{GFP visualized?}, and \code{abundance}. The remaining columns correspond to the 23 subcellular localizations considered in the YeastGFP project (Huh et al., 2003 and Ghaemmaghami et al., 2003) and hold values of either \code{T} or \code{F} for each protein. \samp{yeastgfp.csv} was downloaded on 2007-02-01 from http://yeastgfp.ucsf.edu using the Advanced Search, setting options to download the entire dataset and to include localization table and abundance, sorted by orf number. See \code{\link{yeastgfp}} and \code{demo("yeastgfp")} for examples that use this file.
+    \item \code{microbes.csv} has data for microbial occurrence (i.e. relative enrichement) in colorectal cancer and normal tissue. The file is from the Supporting Information of Dick (2016). This file is used by \code{demo("bugstab")}.
   }
 
   Files in \code{bison} contain BLAST results and taxonomic information for an environmental metagenome from the Bison Pool hot spring in Yellowstone National Park:
@@ -30,7 +30,7 @@
     \item \code{PM90.csv} Heat capacities of four unfolded aqueous proteins taken from Privalov and Makhatadze, 1990. Temperature in \eqn{^{\circ}}{°}C is in the first column, and heat capacities of the proteins in J mol\eqn{^{-1}}{^-1} K\eqn{^{-1}}{^-1} in the remaining columns. See \code{\link{ionize.aa}} and the vignette \code{anintro.Rmd} for examples that uses this file.
     \item \code{RH95.csv} Heat capacity data for iron taken from Robie and Hemingway, 1995. Temperature in Kelvin is in the first column, heat capacity in J K\eqn{^{-1}}{^-1} mol\eqn{^{-1}}{^-1} in the second. See \code{\link{subcrt}} for an example that uses this file.
     \item \code{RT71.csv} pH titration measurements for unfolded lysozyme (\samp{LYSC_CHICK}) taken from Roxby and Tanford, 1971. pH is in the first column, net charge in the second. See \code{\link{ionize.aa}} for an example that uses this file.
-    \item \code{SOJSH.csv} Experimental equilibrium constants for the reaction NaCl(aq) = Na+ + Cl- as a function of temperature and pressure taken from Fig. 1 of Shock et al., 1992. Data were extracted from the figure using g3data (\url{http://www.frantz.fi/software/g3data.php}). See \code{\link{demos}("NaCl")} for an example that uses this file.
+    \item \code{SOJSH.csv} Experimental equilibrium constants for the reaction NaCl(aq) = Na+ + Cl- as a function of temperature and pressure taken from Fig. 1 of Shock et al., 1992. Data were extracted from the figure using g3data (\url{http://www.frantz.fi/software/g3data.php}). See \code{demo("NaCl")} for an example that uses this file.
     \item \code{Cp.CH4.HW97.csv}, \code{V.CH4.HWM96.csv} Apparent molar heat capacities and volumes of CH4 in dilute aqueous solutions reported by Hnědkovský and Wood, 1997 and Hnědkovský et al., 1996. See \code{\link{EOSregress}} and the vignette \code{eos-regress.Rmd} for examples that use these files.
     \item \code{SC10_Rainbow.csv} Values of temperature (\eqn{^{\circ}}{°}C), pH and logarithms of activity of \eqn{\mathrm{CO_2}}{CO2}, \eqn{\mathrm{H_2}}{H2}, \eqn{\mathrm{NH_4^+}}{NH4+}, \eqn{\mathrm{H_2S}}{H2S} and \eqn{\mathrm{CH_4}}{CH4} for mixing of seawater and hydrothermal fluid at Rainbow field (Mid-Atlantic Ridge), taken from Shock and Canovas, 2010. See the vignette \code{anintro.Rmd} for an example that uses this file.
     \item \code{SS98_Fig5a.csv}, \code{SS98_Fig5b.csv} Values of logarithm of fugacity of \eqn{\mathrm{O_2}}{O2} and pH as a function of temperature for mixing of seawater and hydrothermal fluid, digitized from Figs. 5a and b of Shock and Schulte, 1998. See the vignette \code{anintro.Rmd} for an example that uses this file.
@@ -61,7 +61,7 @@
     \item \code{microbial.aa.csv}
       Overall protein compositions of microbial species reported to be positively or negatively enriched in colorectal cancer.
       This file is taken from Dick, 2016.
-      It is used by \code{\link{demos}("bugstab")}.
+      It is used by \code{demo("bugstab")}.
   }
 
   Files in \code{refseq} contain code and results of processing NCBI Reference Sequences (RefSeq) for microbial proteins, using RefSeq release 61 of 2013-09-09:
@@ -97,7 +97,7 @@
     \item \code{Ste01.csv} and \code{BZA10.csv} contain supplementary thermodynamic data taken from Stefansson (2001) and Bazarkina et al. (2010). They can be added to the database in the current session using \code{\link{add.obigt}}. See \code{\link{add.obigt}} and the vignette \code{eos-regress.Rmd} for examples that use these files.
     \item \code{obigt_check.csv} contains the results of running \code{\link{check.obigt}} to check the internal consistency of entries in the primary and supplementary databases.
     \item \code{RH98_Table15.csv} Group stoichiometries for high molecular weight crystalline and liquid organic compounds taken from Table 15 of Richard and Helgeson, 1998. The first three columns have the \code{compound} name, \code{formula} and physical \code{state} (\samp{cr} or \samp{liq}). The remaining columns have the numbers of each group in the compound; the names of the groups (columns) correspond to species in \code{\link{thermo}$obigt}. The compound named \samp{5a(H),14a(H)-cholestane} in the paper has been changed to \samp{5a(H),14b(H)-cholestane} here to match the group stoichiometry given in the table. See \code{\link{RH2obigt}} for a function that uses this file.
-    \item \code{DLEN67.csv} Standard Gibbs energies of formation, in kcal/mol, from Dayhoff et al., 1967, for nitrogen (N2) plus 17 compounds shown in Fig. 2 of Dayhoff et al., 1964, at 300, 500, 700 and 1000 K. See \code{\link{demos}("wjd")} and the vignette \code{wjd.Rmd} for examples that use this file.
+    \item \code{DLEN67.csv} Standard Gibbs energies of formation, in kcal/mol, from Dayhoff et al., 1967, for nitrogen (N2) plus 17 compounds shown in Fig. 2 of Dayhoff et al., 1964, at 300, 500, 700 and 1000 K. See \code{demo("wjd")} and the vignette \code{wjd.Rmd} for examples that use this file.
   }
 
 

Modified: pkg/CHNOSZ/man/findit.Rd
===================================================================
--- pkg/CHNOSZ/man/findit.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/findit.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -74,6 +74,6 @@
 \code{findit} returns a list having class \code{findit} with elements \code{value} (values of the parameters, and value of the objective function, at each iteration), \code{lolim} (lower limits of the parameters) and \code{hilim} (upper limits of the parameters).
 }
 
-\seealso{ \code{\link{demos}("findit")} and \code{test-findit.R} for examples. }
+\seealso{ \code{demo("findit")} and \code{test-findit.R} for examples. }
 
 \concept{Secondary thermodynamic modeling}

Modified: pkg/CHNOSZ/man/info.Rd
===================================================================
--- pkg/CHNOSZ/man/info.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/info.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -40,16 +40,12 @@
 }
 
 
-\seealso{ \code{\link{thermo}} }
+\seealso{ \code{\link{thermo}}, \code{\link{check.obigt}} }
 
 \examples{
 \dontshow{data(thermo)}
 ## summary of available data
 info()
-\dontrun{
-## run a consistency check on each species in the database
-# (marked dontrun because it takes a while)
-info(check=TRUE) }
 
 ## species information
 # search for something named (or whose formula is) "Fe"

Modified: pkg/CHNOSZ/man/nonideal.Rd
===================================================================
--- pkg/CHNOSZ/man/nonideal.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/nonideal.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -19,7 +19,8 @@
 
 \details{
 \code{nonideal} takes a list of dataframes (in \code{proptable}) containing the standard molal properties of the identified \code{species}.
-The function bypasses (leaves unchanged) properties of the proton (H+), electron (e-), and all species whose charge (determined by the number of Z in their \code{\link{makeup}}) is equal to zero.
+The function bypasses (leaves unchanged) properties of all species whose charge (determined by the number of Z in their \code{\link{makeup}}) is equal to zero.
+The proton (H+) and electron (e-) are also bypassed by default; to apply the calculations to H+ and/or e-, change \code{\link{thermo}$opt$ideal.H} or \code{ideal.e} to FALSE.
 The values of \code{IS} are combined with Alberty's (2003) equation 3.6-1 (extended Debye-Hückel equation) and its derivatives, to calculate apparent molal properties at the specified ionic strength(s) and temperature(s).
 The lengths of \code{IS} and \code{T} supplied in the arguments should be equal to the number of rows of each dataframe in \code{proptable}, or one to use single values throughout.
 The apparent molal properties that can be calculated include \code{G}, \code{H}, \code{S} and \code{Cp}; any columns in the dataframes of \code{proptable} with other names are left untouched.
@@ -65,7 +66,7 @@
   IS=c(0, 0.1, 0.25), T=25, property="logK")
 # note that *apparent* values equal *standard* values at IS=0
 # reset option to default
-thermo$opt$ideal.H <<- FALSE
+thermo$opt$ideal.H <<- TRUE
 
 ## p. 95: basis and elemental stoichiometries of species 
 # (this example doesn't use activity coefficients)

Copied: pkg/CHNOSZ/man/palply.Rd (from rev 195, pkg/CHNOSZ/man/util.program.Rd)
===================================================================
--- pkg/CHNOSZ/man/palply.Rd	                        (rev 0)
+++ pkg/CHNOSZ/man/palply.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -0,0 +1,32 @@
+\encoding{UTF-8}
+\name{palply}
+\alias{palply}
+
+\title{Conditional Parallel Processing}
+\description{
+  Use multiple processors for large calculations.
+}
+
+\usage{
+  palply(varlist, X, FUN, ...)
+}
+
+\arguments{
+  \item{...}{equivalent to the same argument in \code{\link[parallel]{parLapply}}}
+  \item{varlist}{character, names of variables to export using \code{\link[parallel]{clusterExport}}}
+  \item{X}{vector, argument for \code{\link{lapply}} or \code{parLapply}}
+  \item{FUN}{function, argument for \code{lapply} or \code{parLapply}}
+}
+
+\details{
+\code{palply} is a wrapper function to run \code{\link[parallel]{parLapply}} if length of \code{X} > \code{\link{thermo}$opt$paramin} and multiple cores are available, otherwise it runs \code{\link{lapply}}.
+Note that \code{parLapply} is called with \code{methods} set to FALSE.
+If lots of package startup messages are created when running \code{\link[parallel]{makeCluster}} (which is called by \code{palply}), it can probably be stopped by adding a test for \code{\link{interactive}} sessions around any \code{\link{library}} commands in the \code{\link{Rprofile}}.
+}
+
+\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}.
+}
+
+\keyword{utilities}

Modified: pkg/CHNOSZ/man/read.expr.Rd
===================================================================
--- pkg/CHNOSZ/man/read.expr.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/read.expr.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -28,8 +28,8 @@
 \code{read.expr} and \code{yeastgfp} read data files stored in \code{\link{extdata}/abundance} to retrieve identities and possibly abundances of proteins in certain conditions.
 
 \code{yeastgfp} returns the identities and abundances of proteins with the requested subcellular localization(s) (specified in \code{location}) using data from the YeastGFP project that is stored in \code{\link{extdata}/abundance/yeastgfp.csv.xz}.
-The default value of \code{exclusive} (\code{FALSE}) tells the function to grab all proteins that are localized to a compartment even if they are also localized to other compartments.
-If \code{exclusive} is \code{TRUE}, only those proteins that are localized exclusively to the requested compartments are identified, unless there are no such proteins, then the non-exclusive localizations are used (applies to the \samp{bud} localization).
+If \code{exclusive} is \code{FALSE}, the function grabs all proteins that are localized to a compartment even if they are also localized to other compartments.
+If \code{exclusive} is \code{TRUE} (the default), only those proteins that are localized exclusively to the requested compartments are identified, unless there are no such proteins, then the non-exclusive localizations are used (applies to the \samp{bud} localization).
 
 \code{read.expr} reads a \code{file} (CSV format) that contains protein sequence names or IDs and protein abundance data.
 \code{idcol} and \code{abundcol} are either the names of the columns holding the sequence IDs and protein abundances, or numeric values indicating the column numbers where these data are found.
@@ -111,8 +111,6 @@
 \references{
 Boer, V. M., de Winde, J. H., Pronk, J. T. and Piper, M. D. W. (2003) The genome-wide transcriptional responses of \emph{Saccharomyces cerevisiae} grown on glucose in aerobic chemostat cultures limited for carbon, nitrogen, phosphorus, or sulfur. \emph{J. Biol. Chem.} \bold{278}, 3265--3274. \url{http://dx.doi.org/10.1074/jbc.M209759200}
 
-Dick, J. M. (2009) Calculation of the relative metastabilities of proteins in subcellular compartments of \emph{Saccharomyces cerevisiae}. \emph{BMC Syst. Biol.} \bold{3}:75. \url{http://dx.doi.org/10.1186/1752-0509-3-75}
-
 Ishihama, Y., Schmidt, T., Rappsilber, J., Mann, M., Hartl, F. U., Kerner, M. J. and Frishman, D. (2008) Protein abundance profiling of the \emph{Escherichia coli} cytosol. \emph{BMC Genomics} \bold{9}:102. \url{http://dx.doi.org/10.1186/1471-2164-9-102}
 
 Tai, S. L., Boer, V. M., Daran-Lapujade, P., Walsh, M. C., de Winde, J. H., Daran, J.-M. and Pronk, J. T. (2005) Two-dimensional transcriptome analysis in chemostat cultures: Combinatorial effects of oxygen availability and macronutrient limitation in \emph{Saccharomyces cerevisiae}. \emph{J. Biol. Chem.} \bold{280}, 437--447. \url{http://dx.doi.org/10.1074/jbc.M410573200}

Modified: pkg/CHNOSZ/man/species.Rd
===================================================================
--- pkg/CHNOSZ/man/species.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/species.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -18,17 +18,27 @@
 }
 
 \details{
-  After defining the \code{\link{basis}} species of your system you can use \code{species} to identify for the program the species of interest. A species is operationally a combination of a \code{name} and \code{state}, which are columns of the thermodynamic database in \code{\link{thermo}$obigt}. The function operates on one or more character values of \code{species}. For each first match of \code{species} (optionally restricted to a \code{state} among \samp{aq}, \samp{cr}, \samp{gas}, \samp{liq}) to the name of a species or a formula or abbreviation in the thermodynamic database, a row is added to \code{thermo$species}.  
+After defining the \code{\link{basis}} species of your system you can use \code{species} to identify the species of interest.
+A species is operationally a combination of a \code{name} and \code{state}, which are columns of the thermodynamic database in \code{\link{thermo}$obigt}.
+The function operates on one or more character values of \code{species}.
+For each first match of \code{species} (optionally restricted to a \code{state} among \samp{aq}, \samp{cr}, \samp{gas}, \samp{liq}) to the name of a species or a formula or abbreviation in the thermodynamic database, a row is added to \code{thermo$species}.  
 
-  The data frame in \code{thermo$species} holds the identifying characteristics of the species as well as the stoichiometric reaction coefficients for the formation of each of the species from the basis species, and reference settings for the logarithms of activities or fugacities used in calculations of \code{\link{affinity}}. The default values for logarithms of activities are -3 for aqueous (\samp{aq}) species and 0 for others. 
+The data frame in \code{thermo$species} holds the identifying characteristics of the species as well as the stoichiometric reaction coefficients for the formation of each of the species from the basis species, the logarithms of activities or fugacities that are used by \code{\link{affinity}}.
+The default values for logarithms of activities are -3 for aqueous (\samp{aq}) species and 0 for others. 
 
-  If \code{state} is \code{NULL} (the default), species in any state can be matched in the thermodynamic database. If there are multiple matches for a species, the one that is in the state given by \code{thermo$opt$state} is chosen, otherwise the matching (or \eqn{n}{n}'th matching duplicate) species is used. Note that the \code{state}s of species representing phases of minerals that undergo phase transitions are coded as \samp{cr1}, \samp{cr2}, \samp{cr3}, \code{...} (phases with increasing temperature). If \code{state} is \samp{cr} when one of these minerals is matched, all the phase species are added.
+If \code{state} is \code{NULL} (the default), species in any state can be matched in the thermodynamic database.
+If there are multiple matches for a species, the one that is in the state given by \code{thermo$opt$state} is chosen, otherwise the matching (or \eqn{n}{n}'th matching duplicate) species is used.
+Note that the \code{state}s of species representing phases of minerals that undergo phase transitions are coded as \samp{cr1}, \samp{cr2}, \samp{cr3}, \code{...} (phases with increasing temperature).
+If \code{state} is \samp{cr} when one of these minerals is matched, all the phase species are added.
 
-  To modify the logarithms of activities of species (logarithms of fugacities for gases) provide one or more numeric values of \code{species} referring to the rownumbers of the species dataframe, or \code{species} NULL, to modify all currently defined species. The values in \code{state}, if numeric, are interpreted as the logarithms of activities, or if character are interpreted as states to which the species should be changed. If \code{species} is numeric and \code{delete} is \code{TRUE}, the rows representing these species are deleted from the dataframe; if the only argument is \code{delete} and it is \code{TRUE}, all the species are removed.
+To modify the logarithms of activities of species (logarithms of fugacities for gases) provide one or more numeric values of \code{species} referring to the rownumbers of the species dataframe, or \code{species} NULL, to modify all currently defined species.
+The values in \code{state}, if numeric, are interpreted as the logarithms of activities, or if character are interpreted as states to which the species should be changed.
+If \code{species} is numeric and \code{delete} is \code{TRUE}, the rows representing these species are deleted from the dataframe; if the only argument is \code{delete} and it is \code{TRUE}, all the species are removed.
 }
 
 \value{
-  With no arguments or when adding species, \code{species} returns the value of \code{thermo$species}, unless \code{index.return} is TRUE, when the function returns the rownumbers of \code{thermo$species} having the new species. With \samp{delete=TRUE}, the value is the definition that existed prior the deletion; with \samp{delete=TRUE} and \samp{species} not NULL, the number of species remaining after the selected ones have been deleted, or \code{NULL} if no species remain.
+With no arguments or when adding species, \code{species} returns the value of \code{thermo$species}, unless \code{index.return} is TRUE, when the function returns the rownumbers of \code{thermo$species} having the new species.
+With \samp{delete=TRUE}, the value is the definition that existed prior the deletion; with \samp{delete=TRUE} and \samp{species} not NULL, the number of species remaining after the selected ones have been deleted, or \code{NULL} if no species remain.
 }
 
 \seealso{

Modified: pkg/CHNOSZ/man/subcrt.Rd
===================================================================
--- pkg/CHNOSZ/man/subcrt.Rd	2017-05-02 04:44:02 UTC (rev 195)
+++ pkg/CHNOSZ/man/subcrt.Rd	2017-05-03 02:39:19 UTC (rev 196)
@@ -3,7 +3,7 @@
 \alias{subcrt}
 \title{Properties of Species and Reactions}
 \description{
-  Calculate the standard molal thermodynamic properties of one or more species or a reaction between species as a function of temperature and pressure. Import or export thermodynamic data in \acronym{SUPCRT} format.
+  Calculate the standard molal thermodynamic properties of one or more species or a reaction between species as a function of temperature and pressure.
 }
 
 \usage{
@@ -31,12 +31,14 @@
 }
 
 \details{
[TRUNCATED]

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


More information about the CHNOSZ-commits mailing list