[CHNOSZ-commits] r832 - in pkg/CHNOSZ: . inst inst/tinytest man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 16 06:41:58 CET 2024


Author: jedick
Date: 2024-03-16 06:41:57 +0100 (Sat, 16 Mar 2024)
New Revision: 832

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/inst/NEWS.Rd
   pkg/CHNOSZ/inst/TODO
   pkg/CHNOSZ/inst/tinytest/test-add.protein.R
   pkg/CHNOSZ/man/add.protein.Rd
   pkg/CHNOSZ/man/rank.affinity.Rd
   pkg/CHNOSZ/vignettes/anintro.Rmd
   pkg/CHNOSZ/vignettes/mklinks.sh
Log:
Update for renamed function in canprot


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/DESCRIPTION	2024-03-16 05:41:57 UTC (rev 832)
@@ -1,6 +1,6 @@
-Date: 2024-03-04
+Date: 2024-03-16
 Package: CHNOSZ
-Version: 2.1.0-4
+Version: 2.1.0-5
 Title: Thermodynamic Calculations and Diagrams for Geochemistry
 Authors at R: c(
     person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),

Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/inst/NEWS.Rd	2024-03-16 05:41:57 UTC (rev 832)
@@ -15,11 +15,11 @@
 \newcommand{\Cp}{\ifelse{latex}{\eqn{C_P}}{\ifelse{html}{\out{<I>C<sub>P</sub></I>}}{Cp}}}
 \newcommand{\DG0}{\ifelse{latex}{\eqn{{\Delta}G^{\circ}}}{\ifelse{html}{\out{Δ<I>G</I>°}}{ΔG°}}}
 
-\section{Changes in CHNOSZ version 2.1.0-3 (2024-03-02)}{
+\section{Changes in CHNOSZ version 2.1.0-5 (2024-03-16)}{
 
     \itemize{
 
-      \item Move \code{read.fasta()}, \code{count.aa()}, and \code{aasum()} to canprot package.
+      \item Move \code{read.fasta()}, \code{count.aa()}, and \code{aasum()} to canprot package with different names.
 
       \item Remove \code{seq2aa()}.
 

Modified: pkg/CHNOSZ/inst/TODO
===================================================================
--- pkg/CHNOSZ/inst/TODO	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/inst/TODO	2024-03-16 05:41:57 UTC (rev 832)
@@ -57,7 +57,3 @@
 - Re-enter data from PS01 and AP01 (original units in J not cal)
 
 - subcrt(): Don't output properties in HKF region 4
-
-[20220503]
-
-- Don't use palply in read.fasta()

Modified: pkg/CHNOSZ/inst/tinytest/test-add.protein.R
===================================================================
--- pkg/CHNOSZ/inst/tinytest/test-add.protein.R	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/inst/tinytest/test-add.protein.R	2024-03-16 05:41:57 UTC (rev 832)
@@ -12,7 +12,7 @@
 expect_equal(ip1, ip2, info = info)
 
 info <- "Errors and messages occur in some circumstances"
-expect_error(add.protein(canprot::count.aa("AAA")), "does not have the same columns as thermo\\(\\)\\$protein", info = info)
+expect_error(add.protein(canprot::count_aa("AAA")), "does not have the same columns as thermo\\(\\)\\$protein", info = info)
 expect_message(add.protein(pinfo(pinfo("CYC_BOVIN"))), "replaced 1 existing protein\\(s\\)", info = info)
 
 info <- "group additivity for proteins gives expected values"
@@ -32,12 +32,12 @@
 expect_equal(V, lprop$V, tolerance = 1e-4, info = info)
 expect_equal(formula, lprop$formula, info = info)
 
-info <- "read.fasta() identifies sequences correctly and gives amino acid compositions in the correct format"
+info <- "read_fasta() identifies sequences correctly and gives amino acid compositions in the correct format"
 ffile <- system.file("extdata/protein/rubisco.fasta", package = "CHNOSZ")
-aa <- canprot::read.fasta(ffile)
-expect_equal(aa[1, ], canprot::read.fasta(ffile, 1), info = info)
+aa <- canprot::read_fasta(ffile)
+expect_equal(aa[1, ], canprot::read_fasta(ffile, 1), info = info)
 # Use unlist here so that different row names are not compared
-aa8 <- canprot::read.fasta(ffile, 1:8)
+aa8 <- canprot::read_fasta(ffile, 1:8)
 expect_equal(unlist(aa[1:8, ]), unlist(aa8), info = info)
 expect_message(ip1 <- add.protein(aa8), "added 8 new protein\\(s\\)", info = info)
 expect_message(ip2 <- add.protein(aa8), "replaced 8 existing protein\\(s\\)", info = info)

Modified: pkg/CHNOSZ/man/add.protein.Rd
===================================================================
--- pkg/CHNOSZ/man/add.protein.Rd	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/man/add.protein.Rd	2024-03-16 05:41:57 UTC (rev 832)
@@ -45,7 +45,7 @@
 }
 
 \seealso{
-\code{\link[canprot]{read.fasta}} for reading amino acid compositions from FASTA files.
+\code{\link[canprot]{read_fasta}} for reading amino acid compositions from FASTA files.
 
 \code{\link{pinfo}} for protein-level functions (length, chemical formulas, reaction coefficients of basis species).
 }

Modified: pkg/CHNOSZ/man/rank.affinity.Rd
===================================================================
--- pkg/CHNOSZ/man/rank.affinity.Rd	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/man/rank.affinity.Rd	2024-03-16 05:41:57 UTC (rev 832)
@@ -41,7 +41,7 @@
 datfile <- system.file("extdata/cpetc/rubisco.csv", package = "CHNOSZ")
 fastafile <- system.file("extdata/protein/rubisco.fasta", package = "CHNOSZ")
 dat <- read.csv(datfile)
-aa <- canprot::read.fasta(fastafile)
+aa <- canprot::read_fasta(fastafile)
 groups <- sapply(c("A", "B", "E"), "==", dat$domain, simplify = FALSE)
 names(groups) <- c("Archaea", "Bacteria", "Eukaryota")
 ip <- add.protein(aa, as.residue = TRUE)

Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd	2024-03-16 05:41:57 UTC (rev 832)
@@ -1242,7 +1242,7 @@
 
 Let's compare the `r zc` of Rubisco with optimal growth temperature of organisms, as shown in Figure 6a of @Dic14.
 First we read a CSV file with the IDs of the proteins and the optimal growth temperatures (*T*<sub>opt</sub>); the midpoint of the range of *T*<sub>opt</sub> is used for plotting.
-Then we use `canprot::read.fasta()` to read a FASTA file holding the amino acid sequences of the proteins; the function returns a data frame with the amino acid counts.
+Then we use `canprot::read_fasta()` to read a FASTA file holding the amino acid sequences of the proteins; the function returns a data frame with the amino acid counts.
 To put the proteins in the right order, the IDs in the CSV file are matched to the names of the proteins in the FASTA file.
 Then, we calculate `r zc` from the formulas of the proteins.
 Next, point symbols are assigned according to domain (Archaea, Bacteria, Eukaryota); numbers inside the symbols show the ordering of *T*<sub>opt</sub> in three temperature ranges (0--35 °C, 37.5--60 °C, and 65--100 °C).
@@ -1255,7 +1255,7 @@
 #  datfile <- system.file("extdata/cpetc/rubisco.csv", package = "CHNOSZ")
 #  fastafile <- system.file("extdata/protein/rubisco.fasta", package = "CHNOSZ")
 #  dat <- read.csv(datfile)
-#  aa <- canprot::read.fasta(fastafile)
+#  aa <- canprot::read_fasta(fastafile)
 #  Topt <- (dat$T1 + dat$T2) / 2
 #  idat <- match(dat$ID, substr(aa$protein, 4, 9))
 #  aa <- aa[idat, ]
@@ -1290,7 +1290,7 @@
 datfile <- system.file("extdata/cpetc/rubisco.csv", package = "CHNOSZ")
 fastafile <- system.file("extdata/protein/rubisco.fasta", package = "CHNOSZ")
 dat <- read.csv(datfile)
-aa <- canprot::read.fasta(fastafile)
+aa <- canprot::read_fasta(fastafile)
 Topt <- (dat$T1 + dat$T2) / 2
 idat <- match(dat$ID, substr(aa$protein, 4, 9))
 aa <- aa[idat, ]
@@ -1339,7 +1339,7 @@
 By projecting the compositions of proteins into the `QEC` set of basis species, *n*<sub>`r o2`</sub> emerges as a strong indicator of oxidation state, while *n*<sub>`r h2o`</sub> is a relatively uncorrelated (i.e. independent) variable.
 These independent variables make it easier to distinguish the effects of oxidation and hydration state in proteomic datasets [@DYT20].
 
-- The [canprot](https://github.com/jedick/canprot) package has functions to calculate chemical metrics (*Z*<sub>C</sub>, *n*<sub>`r o2`</sub>, and *n*<sub>`r h2o`</sub>) directly from amino acid compositions of proteins, and to read amino acid compositions from FASTA files (`canprot::read.fasta()`).
+- The [canprot](https://github.com/jedick/canprot) package has functions to calculate chemical metrics (*Z*<sub>C</sub>, *n*<sub>`r o2`</sub>, and *n*<sub>`r h2o`</sub>) directly from amino acid compositions of proteins, and to read amino acid compositions from FASTA files (`canprot::read_fasta()`).
 
 ## Normalization to residues
 

Modified: pkg/CHNOSZ/vignettes/mklinks.sh
===================================================================
--- pkg/CHNOSZ/vignettes/mklinks.sh	2024-03-03 23:50:42 UTC (rev 831)
+++ pkg/CHNOSZ/vignettes/mklinks.sh	2024-03-16 05:41:57 UTC (rev 832)
@@ -10,7 +10,6 @@
 sed -i 's/<code>?buffer<\/code>/<code><a href="..\/html\/buffer.html" style="background-image:none;">?buffer<\/a><\/code>/g' anintro.html
 sed -i 's/<code>?solubility<\/code>/<code><a href="..\/html\/solubility.html" style="background-image:none;">?solubility<\/a><\/code>/g' anintro.html
 sed -i 's/<code>?ionize.aa<\/code>/<code><a href="..\/html\/ionize.aa.html" style="background-image:none;">?ionize.aa<\/a><\/code>/g' anintro.html
-sed -i 's/<code>?count.aa<\/code>/<code><a href="..\/html\/util.fasta.html" style="background-image:none;">?count.aa<\/a><\/code>/g' anintro.html
 sed -i 's/<code>?thermo<\/code>/<code><a href="..\/html\/thermo.html" style="background-image:none;">?thermo<\/a><\/code>/g' anintro.html
 sed -i 's/<code>?hkf<\/code>/<code><a href="..\/html\/eos.html" style="background-image:none;">?hkf<\/a><\/code>/g' anintro.html
 sed -i 's/<code>?cgl<\/code>/<code><a href="..\/html\/eos.html" style="background-image:none;">?cgl<\/a><\/code>/g' anintro.html



More information about the CHNOSZ-commits mailing list