diff --git a/tests/testthat/test-multiomic.R b/tests/testthat/test-multiomic.R index fc95cfd..1c411e2 100644 --- a/tests/testthat/test-multiomic.R +++ b/tests/testthat/test-multiomic.R @@ -30,3 +30,21 @@ test_that("ivar = NA works as expected", { ivarNA@logratio ) }) + +# Test updateCutoffs for the ivar = NA wrapper +set.seed(1) +pr_auto <- propr(iris[,1:4]) +clr <- function(x) sweep(log(x), 1, rowMeans(log(x)), "-") +myCLR <- clr(iris[,1:4]) +set.seed(1) +pr_manual <- propr(myCLR, ivar = NA) +pr_auto <- updateCutoffs(pr_auto, cutoff = seq(0, 1, .05)) +pr_manual <- updateCutoffs(pr_manual, cutoff = seq(0, 1, .05)) + +test_that("ivar = NA will work with FDR", { + + expect_equal( + pr_auto@fdr, + pr_manual@fdr + ) +})