Skip to content

Commit

Permalink
Whoops, this one actually checks ivar = NA FDR thing
Browse files Browse the repository at this point in the history
  • Loading branch information
tpq committed Apr 15, 2020
1 parent 30fe458 commit 2bd7c44
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/testthat/test-multiomic.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
})

0 comments on commit 2bd7c44

Please sign in to comment.