Skip to content

Commit

Permalink
Make test dependent on limma version
Browse files Browse the repository at this point in the history
  • Loading branch information
jpquast committed Nov 2, 2024
1 parent 047b711 commit 75ba857
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/testthat/test-workflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,13 @@ test_that("calculate_diff_abundance works", {
expect_equal(ncol(diff_moderated), 13)
expect_equal(ncol(diff_proDA), 12)
expect_equal(round(min(diff_mean_sd$adj_pval, na.rm = TRUE), digits = 9), 0.00758761)
expect_equal(round(min(diff_moderated$adj_pval, na.rm = TRUE), digits = 9), 3.87e-05)
expect_equal(round(min(diff_proDA$adj_pval, na.rm = TRUE), digits = 5), 0.00125)

if (packageVersion("limma") < "3.61.8") {
expect_equal(round(min(diff_moderated$adj_pval, na.rm = TRUE), digits = 9), 3.87e-05)
} else {
expect_equal(round(min(diff_moderated$adj_pval, na.rm = TRUE), digits = 9), 5.76e-05)
}
}
})

Expand Down

0 comments on commit 75ba857

Please sign in to comment.