Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ authors:
given-names: "Philipp"
orcid: "https://orcid.org/0009-0002-7697-5536"
title: "pam"
version: 2.0.2
date-released: 2025-07-29
<<<<<<< HEAD
version: 2.0.3
=======
version: 2.1.0
>>>>>>> a691a6c (renamed etrmax_with_without_ratio to etrmax_without_with_ratio)
date-released: 2026-04-11
url: "https://github.com/biotoolbox/pam"
doi: "10.32614/CRAN.package.pam"
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ build:
buildtest:
rm -rf src/tests/testthat/results
make build
R CMD check pam_2.0.2.tar.gz
<<<<<<< HEAD
R CMD check pam_2.0.3.tar.gz
=======
R CMD check pam_2.1.0.tar.gz
>>>>>>> a691a6c (renamed etrmax_with_without_ratio to etrmax_without_with_ratio)
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ $${alpha} = \frac{{etrmax\\_with\\_photoinhibition}}{{ik\\_with\\_photoinhibitio

- **w**: Not available, here set to `NA_real_`
- **ib**: Not available, here set to `NA_real_`
- **etrmax_with_without_ratio**: Ratio of `etrmax_with_photoinhibition` to `etrmax_without_photoinhibition` and `ik_with_photoinhibition` to `ik_without_photoinhibition`, transfered as: `pmax_popt_and_ik_iik_ratio`
- **etrmax_without_with_ratio**: Ratio of `etrmax_without_photoinhibition` / `etrmax_with_photoinhibition` and `ik_without_photoinhibition` / `ik_with_photoinhibition`, transfered as: `pmax_popt_and_ik_iik_ratio`

#### Details

Expand Down Expand Up @@ -519,9 +519,9 @@ Returns a modified model result as a list with the following elements:
- **im_with_photoinhibition**: The PAR at which the maximum electron transport rate is achieved by taking photoinhibition into account, transfered as: `im`
- **w**: Not available, here set to `NA_real_`
- **ib**: Transfered unchange as: `ib`
- **etrmax_with_without_ratio**: Ratio of `etrmax_with_photoinhibition` to `etrmax_without_photoinhibition` and `ik_with_photoinhibition` to `ik_without_photoinhibition`. Calculated as:
- **etrmax_without_with_ratio**: Ratio of `etrmax_without_photoinhibition` / `etrmax_with_photoinhibition` and `ik_without_photoinhibition` / `ik_with_photoinhibition`. Calculated as:

$${{etrmax\\_with\\_without\\_ratio}} = \frac{{etrmax\\_with\\_photoinhibition}}{{etrmax\\_without\\_photoinhibition}}$$
$${{etrmax\\_with\\_without\\_ratio}} = \frac{{etrmax\\_without\\_photoinhibition}}{{etrmax\\_with\\_photoinhibition}}$$

#### Details

Expand Down Expand Up @@ -563,7 +563,7 @@ Returns a modified model result as a list with the following elements:
- **im_with_photoinhibition**: The PAR at which the maximum electron transport rate is achieved by taking photoinhibition into account, transfered as`im`
- **w**: The sharpness of the peak, transfered as `w`
- **ib**: Not available, here set to `NA_real_`
- **etrmax_with_without_ratio**: Not available, here set to `NA_real_`
- **etrmax_without_with_ratio**: Not available, here set to `NA_real_`

#### Details

Expand Down Expand Up @@ -626,7 +626,7 @@ $$ik\\_without\\_photoinhibition = \frac{etrmax\\_without\\_photoinhibition}{alp

- **w**: Not available, here set to `NA_real_`
- **ib**: Not available, here set to `NA_real_`
- **etrmax_with_without_ratio**: Ratio of `etrmax_with_photoinhibition` to `etrmax_without_photoinhibition` and `ik_with_photoinhibition` to `ik_without_photoinhibition`. Calculated as:
- **etrmax_without_with_ratio**: Ratio of `etrmax_without_photoinhibition` / `etrmax_with_photoinhibition` and `ik_without_photoinhibition` / `ik_with_photoinhibition`. Calculated as:

$${{etrmax\\_with\\_without\\_ratio}} = \frac{{etrmax\\_with\\_photoinhibition}}{{etrmax\\_without\\_photoinhibition}}$$

Expand Down Expand Up @@ -662,7 +662,7 @@ modified |Eilers and Peeters |Platt |Walsby |Vollenweider
|im_with_photoinhibition |im |im |NA |NA |
|w |w |NA |NA |NA |
|ib |NA |ib |NA |NA |
|etrmax_with_without_ratio |NA |NA |NA |pmax_popt_and_ik_iik_ratio |
|etrmax_without_with_ratio |NA |NA |NA |pmax_popt_and_ik_iik_ratio |

#### Publication-accurate naming and the respective modified naming with additional calculations not included in the original publication

Expand All @@ -684,7 +684,7 @@ modified |Eilers and Peeters |Platt |Walsby |Vollenweider
|im_with_photoinhibition |im |im |im_with_photoinhibition |im_with_photoinhibition |
|w |w |NA |NA |NA |
|ib |NA |ib |NA |NA |
|etrmax_with_without_ratio |NA |etrmax_with_without_ratio |etrmax_with_without_ratio |pmax_popt_and_ik_iik_ratio |
|etrmax_without_with_ratio |NA |etrmax_without_with_ratio |etrmax_without_with_ratio |pmax_popt_and_ik_iik_ratio |

### compare_regression_models_ETR_I() and compare_regression_models_ETR_II()

Expand Down
2 changes: 1 addition & 1 deletion packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ minpack.lm
ggthemes
gridExtra
cowplot
Metrics
Metrics
8 changes: 6 additions & 2 deletions src/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Package: pam
Type: Package
Title: Fast and Efficient Processing of PAM Data
Version: 2.0.2
<<<<<<< HEAD
Version: 2.0.3
=======
Version: 2.1.0
>>>>>>> a691a6c (renamed etrmax_with_without_ratio to etrmax_without_with_ratio)
Authors@R: c(
person(
"Julien",
Expand All @@ -26,7 +30,7 @@ LazyData: true
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Imports:
rlang,
data.table,
Expand Down
2 changes: 1 addition & 1 deletion src/R/eilers_peeters.R
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ eilers_peeters_generate_regression_internal <- function(
#' \item \code{im_with_photoinhibition}: The PAR at which the maximum electron transport rate is achieved with photoinhibition, transferred as \code{im}.
#' \item \code{w}: The sharpness of the peak, transferred as \code{w}.
#' \item \code{ib}: Not available, set to \code{NA_real_}.
#' \item \code{etrmax_with_without_ratio}: Not available, set to \code{NA_real_}.
#' \item \code{etrmax_without_with_ratio}: Not available, set to \code{NA_real_}.
#' }
#'
#' @details
Expand Down
4 changes: 2 additions & 2 deletions src/R/platt.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ platt_generate_regression_internal <- function(
#' \item \code{im_with_photoinhibition}: The PAR at which the maximum electron transport rate is achieved with photoinhibition, transferred as \code{im}.
#' \item \code{w}: Not available, set to \code{NA_real_}.
#' \item \code{ib}: Transferred unchanged as \code{ib}.
#' \item \code{etrmax_with_without_ratio}: Ratio of \code{etrmax_with_photoinhibition} to \code{etrmax_without_photoinhibition}, and \code{ik_with_photoinhibition} to \code{ik_without_photoinhibition}.
#' \item \code{etrmax_without_with_ratio}: Ratio of \code{etrmax_with_photoinhibition} to \code{etrmax_without_photoinhibition}, and \code{ik_with_photoinhibition} to \code{ik_without_photoinhibition}.
#' }
#'
#' @details
Expand Down Expand Up @@ -334,7 +334,7 @@ platt_modified <- function(model_result) {
im_with_photoinhibition = model_result[["im"]],
w = NA_real_,
ib = model_result[["ib"]],
etrmax_with_without_ratio = model_result[["ps"]] / model_result[["pm"]]
etrmax_without_with_ratio = model_result[["ps"]] / model_result[["pm"]]
)

return(result)
Expand Down
4 changes: 2 additions & 2 deletions src/R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ create_modified_model_result <- function(
im_with_photoinhibition,
w,
ib,
etrmax_with_without_ratio) {
etrmax_without_with_ratio) {
result <- list(
etr_type = etr_type,
etr_regression_data = etr_regression_data,
Expand All @@ -231,7 +231,7 @@ create_modified_model_result <- function(
im_with_photoinhibition = im_with_photoinhibition,
w = w,
ib = ib,
etrmax_with_without_ratio = etrmax_with_without_ratio
etrmax_without_with_ratio = etrmax_without_with_ratio
)
validate_modified_model_result(result)
return(result)
Expand Down
6 changes: 3 additions & 3 deletions src/R/validation.R
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ validate_modified_model_result <- function(model_result) {
stop("ib is null or not a valid number")
}

if (is.null(model_result[["etrmax_with_without_ratio"]]) ||
!is.numeric(model_result[["etrmax_with_without_ratio"]])) {
stop("etrmax_with_without_ratio is null or not a valid number")
if (is.null(model_result[["etrmax_without_with_ratio"]]) ||
!is.numeric(model_result[["etrmax_without_with_ratio"]])) {
stop("etrmax_without_with_ratio is null or not a valid number")
}
},
error = function(e) {
Expand Down
4 changes: 2 additions & 2 deletions src/R/vollenweider.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ vollenweider_generate_regression_internal <- function(
#' \item \code{im_with_photoinhibition}: The PAR at which the maximum electron transport rate is achieved by taking photoinhibition into account, determined using the regression data from the model.
#' \item \code{w}: Not available, here set to \code{NA_real_}.
#' \item \code{ib}: Transferred unchanged as \code{ib}.
#' \item \code{etrmax_with_without_ratio}: Ratio of \code{etrmax_with_photoinhibition} to \code{etrmax_without_photoinhibition} and \code{ik_with_photoinhibition} to \code{ik_without_photoinhibition}.
#' \item \code{etrmax_without_with_ratio}: Ratio of \code{etrmax_with_photoinhibition} to \code{etrmax_without_photoinhibition} and \code{ik_with_photoinhibition} to \code{ik_without_photoinhibition}.
#' }
#'
#' @details
Expand Down Expand Up @@ -340,7 +340,7 @@ vollenweider_modified <- function(model_result) {
im_with_photoinhibition = im_with_photoinhibition,
w = NA_real_,
ib = NA_real_,
etrmax_with_without_ratio = model_result[["pmax_popt_and_ik_iik_ratio"]]
etrmax_without_with_ratio = model_result[["pmax_popt_and_ik_iik_ratio"]]
)

return(result)
Expand Down
4 changes: 2 additions & 2 deletions src/R/walsby.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ walsby_generate_regression_internal <- function(
#' \item \code{im_with_photoinhibition}: PAR at the maximum ETR with photoinhibition.
#' \item \code{w}: Not available, set to \code{NA_real_}.
#' \item \code{ib}: Not available, set to \code{NA_real_}.
#' \item \code{etrmax_with_without_ratio}: Ratio of \code{etrmax_with_photoinhibition} to \code{etrmax_without_photoinhibition}.
#' \item \code{etrmax_without_with_ratio}: Ratio of \code{etrmax_with_photoinhibition} to \code{etrmax_without_photoinhibition}.
#' }
#'
#' @details
Expand Down Expand Up @@ -273,7 +273,7 @@ walsby_modified <- function(model_result) {
im_with_photoinhibition = im_with_photoinhibition,
w = NA_real_,
ib = NA_real_,
etrmax_with_without_ratio = model_result[["etr_max"]] / etrmax_with_photoinhibition
etrmax_without_with_ratio = model_result[["etr_max"]] / etrmax_with_photoinhibition
)

return(result)
Expand Down
8 changes: 6 additions & 2 deletions src/inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ citation <- bibentry(
bibtype = "Manual",
title = "pam: Fast and Efficient Processing of PAM Data",
author = c(person("Julien", "Böhm"), person("Philipp", "Schrag")),
year = 2025,
note = "R package version 2.0.2",
year = 2026,
<<<<<<< HEAD
note = "R package version 2.0.3",
=======
note = "R package version 2.1.0",
>>>>>>> a691a6c (renamed etrmax_with_without_ratio to etrmax_without_with_ratio)
url = "https://CRAN.R-project.org/package=pam",
doi = "10.32614/CRAN.package.pam"
)
2 changes: 1 addition & 1 deletion src/man/eilers_peeters_modified.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/man/platt_modified.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/man/vollenweider_modified.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/man/walsby_modified.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions src/tests/testthat/helper-os-detection.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,7 @@ get_os_distro <- function() {
return(tolower(sys_name))
}

is_supported_os <- function() {
os <- get_os_distro()
grepl("\\b(ubuntu|debian|windows)\\b", os, ignore.case = TRUE)
}

is_windows <- function() {
tolower(Sys.info()[["sysname"]]) == "windows"
}

is_debian_or_ubuntu <- function() {
os <- get_os_distro()
grepl("\\b(debian|ubuntu)\\b", os, ignore.case = TRUE)
grepl("\\b(debian|ubuntu|fedora)\\b", os, ignore.case = TRUE)
}
2 changes: 1 addition & 1 deletion src/tests/testthat/test-eilers_peeters_etr_I.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test_that("test-eilers_peeters_etr_I generate regression modified 20240925.csv -
expect_equal(model_result[["im_with_photoinhibition"]], 1399.769662)
expect_equal(model_result[["w"]], 1.18036237)
expect_equal(model_result[["ib"]], NA_real_)
expect_equal(model_result[["etrmax_with_without_ratio"]], NA_real_)
expect_equal(model_result[["etrmax_without_with_ratio"]], NA_real_)
})

test_that("test-eilers_peeters_etr_I generate regression modified 20240925.csv", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-eilers_peeters_etr_II.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test_that("test-eilers_peeters_etr_II modified 20240925.csv - linux", {
expect_equal(model_result[["im_with_photoinhibition"]], 731.801311)
expect_equal(model_result[["w"]], 0.69061233)
expect_equal(model_result[["ib"]], NA_real_)
expect_equal(model_result[["etrmax_with_without_ratio"]], NA_real_)
expect_equal(model_result[["etrmax_without_with_ratio"]], NA_real_)
})

test_that("test-eilers_peeters_etr_II modified 20240925.csv", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-eilers_peeters_junior_pam_etr_II.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test_that("test-eilers_peeters_etr_II modified junior_pam_20250613.csv.csv - lin
expect_equal(model_result[["im_with_photoinhibition"]], 1320.307821)
expect_equal(model_result[["w"]], 5.7674788)
expect_equal(model_result[["ib"]], NA_real_)
expect_equal(model_result[["etrmax_with_without_ratio"]], NA_real_)
expect_equal(model_result[["etrmax_without_with_ratio"]], NA_real_)
})

test_that("test-eilers_peeters_etr_II modified junior_pam_20250613.csv.csv", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-platt_etr_I.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test_that("test-platt_etr_I generate regression modified 20240925.csv - linux",
expect_equal(model_result[["im_with_photoinhibition"]], 1365.39202)
expect_equal(model_result[["w"]], NA_real_)
expect_equal(model_result[["ib"]], 4302.0636)
expect_equal(model_result[["etrmax_with_without_ratio"]], 1.59380602)
expect_equal(model_result[["etrmax_without_with_ratio"]], 1.59380602)
})

test_that("test-platt_etr_I generate regression modified 20240925.csv", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-platt_etr_II.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test_that("test-platt_etr_II generate regression modified 20240925.csv - linux",
expect_equal(model_result[["im_with_photoinhibition"]], 769.889813)
expect_equal(model_result[["w"]], NA_real_)
expect_equal(model_result[["ib"]], 2149.3914)
expect_equal(model_result[["etrmax_with_without_ratio"]], 1.7166423)
expect_equal(model_result[["etrmax_without_with_ratio"]], 1.7166423)
})

test_that("test-platt_etr_II generate regression modified 20240925.csv", {
Expand Down
8 changes: 4 additions & 4 deletions src/tests/testthat/test-universal_data_etr_I.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test_that("test-universal_data_etr_I - linux", {
expect_equal(eilers_peeters[["im_with_photoinhibition"]], 1399.769662)
expect_equal(eilers_peeters[["w"]], 1.18036237)
expect_equal(eilers_peeters[["ib"]], NA_real_)
expect_equal(eilers_peeters[["etrmax_with_without_ratio"]], NA_real_)
expect_equal(eilers_peeters[["etrmax_without_with_ratio"]], NA_real_)

expect_equal(platt[["residual_sum_of_squares"]], 55.4812913)
expect_equal(platt[["a"]], 242.02858)
Expand All @@ -39,7 +39,7 @@ test_that("test-universal_data_etr_I - linux", {
expect_equal(platt[["im_with_photoinhibition"]], 1365.39202)
expect_equal(platt[["w"]], NA_real_)
expect_equal(platt[["ib"]], 4302.0636)
expect_equal(platt[["etrmax_with_without_ratio"]], 1.59380602)
expect_equal(platt[["etrmax_without_with_ratio"]], 1.59380602)

expect_equal(walsby[["residual_sum_of_squares"]], 55.5823146)
expect_equal(walsby[["a"]], 221.237842)
Expand All @@ -55,7 +55,7 @@ test_that("test-universal_data_etr_I - linux", {
expect_equal(walsby[["im_with_photoinhibition"]], 1358.0)
expect_equal(walsby[["w"]], NA_real_)
expect_equal(walsby[["ib"]], NA_real_)
expect_equal(walsby[["etrmax_with_without_ratio"]], 1.456840082)
expect_equal(walsby[["etrmax_without_with_ratio"]], 1.456840082)

expect_equal(vollenweider[["residual_sum_of_squares"]], 57.4443325)
expect_equal(vollenweider[["a"]], 165.4671070)
Expand All @@ -71,7 +71,7 @@ test_that("test-universal_data_etr_I - linux", {
expect_equal(vollenweider[["im_with_photoinhibition"]], 1420)
expect_equal(vollenweider[["w"]], NA_real_)
expect_equal(vollenweider[["ib"]], NA_real_)
expect_equal(vollenweider[["etrmax_with_without_ratio"]], 1.08078520)
expect_equal(vollenweider[["etrmax_without_with_ratio"]], 1.08078520)
})

test_that("test-universal_data_etr_I", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-vollenweider_etr_I.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test_that("test-vollenweider_etr_I generate regression modified 20240925.csv - l
expect_equal(model_result[["im_with_photoinhibition"]], 1420)
expect_equal(model_result[["w"]], NA_real_)
expect_equal(model_result[["ib"]], NA_real_)
expect_equal(model_result[["etrmax_with_without_ratio"]], 1.08078520)
expect_equal(model_result[["etrmax_without_with_ratio"]], 1.08078520)
})

test_that("test-vollenweider_etr_I generate regression modified 20240925.csv", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-vollenweider_etr_II.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test_that("test-vollenweider_etr_II generate regression modified 20240925.csv -
expect_equal(model_result[["im_with_photoinhibition"]], 767.0)
expect_equal(model_result[["w"]], NA_real_)
expect_equal(model_result[["ib"]], NA_real_)
expect_equal(model_result[["etrmax_with_without_ratio"]], 1.194065095)
expect_equal(model_result[["etrmax_without_with_ratio"]], 1.194065095)
})

test_that("test-vollenweider_etr_II generate regression modified 20240925.csv", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-walsby_etr_I.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test_that("test-walsby_etr_I generate regression modified 20240925.csv - linux",
expect_equal(model_result[["im_with_photoinhibition"]], 1358.0)
expect_equal(model_result[["w"]], NA_real_)
expect_equal(model_result[["ib"]], NA_real_)
expect_equal(model_result[["etrmax_with_without_ratio"]], 1.456840082)
expect_equal(model_result[["etrmax_without_with_ratio"]], 1.456840082)
})

test_that("test-walsby_etr_I generate regression modified 20240925.csv", {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/testthat/test-walsby_etr_II.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test_that("test-walsby_etr_II generate regression modified 20240925.csv - linux"
expect_equal(model_result[["im_with_photoinhibition"]], 781.0)
expect_equal(model_result[["w"]], NA_real_)
expect_equal(model_result[["ib"]], NA_real_)
expect_equal(model_result[["etrmax_with_without_ratio"]], 1.44981217)
expect_equal(model_result[["etrmax_without_with_ratio"]], 1.44981217)
})

test_that("test-walsby_etr_II generate regression modified 20240925.csv", {
Expand Down
Loading
Loading