Skip to content

Commit

Permalink
Remove 'basis' option and basis.text()
Browse files Browse the repository at this point in the history
  • Loading branch information
jedick committed Mar 1, 2024
1 parent 1588ccb commit dee1d8f
Show file tree
Hide file tree
Showing 10 changed files with 950 additions and 595 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Date: 2024-02-29
Date: 2024-03-01
Package: canprot
Version: 1.1.2-24
Version: 1.1.2-25
Title: Chemical Analysis of Proteins
Authors@R: c(
person("Jeffrey", "Dick", email = "j3ffdick@gmail.com", role = c("aut", "cre"),
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ export("protcomp", "CLES",
"cplab",
# 20200501, 20200505
"MW",
# 20200817
"basis.text",
# 20201016
"nO2",
# 20240225
Expand Down
12 changes: 3 additions & 9 deletions R/metrics.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Zc <- function(AAcomp, ...) {

# Calculate stoichiometric hydration state from amino acid compositions 20181228
# Add `terminal_H2O` argument 20221018
nH2O <- function(AAcomp, basis = getOption("basis"), terminal_H2O = 0) {
nH2O <- function(AAcomp, basis = "QEC", terminal_H2O = 0) {
if(basis == "QEC") {
# How to get the number of H2O in reactions to form amino acid residues from the "QEC" basis:
# To get the number of H2O in reactions to form amino acid residues from the "QEC" basis:
## library(CHNOSZ)
## basis("QEC")
## nH2O_AA <- species(aminoacids(""))$H2O
Expand Down Expand Up @@ -65,7 +65,7 @@ nH2O <- function(AAcomp, basis = getOption("basis"), terminal_H2O = 0) {
}

# Calculate stoichiometric oxidation state from amino acid compositions 20201016
nO2 <- function(AAcomp, basis = getOption("basis"), ...) {
nO2 <- function(AAcomp, basis = "QEC", ...) {
if(basis == "QEC") {
# How to get the number of O2 in reactions to form amino acid residues from the "QEC" basis:
## library(CHNOSZ)
Expand Down Expand Up @@ -175,12 +175,6 @@ plength <- function(AAcomp, ...) {
rowSums(AAcomp[, isAA])
}

basis.text <- function(basis) {
if(basis=="QEC") bt <- "glutamine, glutamic acid, cysteine"
if(basis=="QCa") bt <- "glutamine, cysteine, acetic acid"
bt
}

#########################
### UNEXPORTED OBJECT ###
### ( used in pI() ) ###
Expand Down
8 changes: 0 additions & 8 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,3 @@ human <- new.env()
uniprot_updates <- read.csv(system.file("/extdata/protein/uniprot_updates.csv", package = "canprot"), as.is = TRUE)
})
}

# Set 'basis' option 20200817
# Adapted from R/src/library/grDevices/zzz.R
.onLoad <- function(libname, pkgname) {
op.canprot <- list(basis = "QEC")
toset <- !(names(op.canprot) %in% names(.Options))
if(any(toset)) options(op.canprot[toset])
}
Loading

0 comments on commit dee1d8f

Please sign in to comment.