From 846a2016efba767c38e8a0b1f796b4f5b1d3cc5c Mon Sep 17 00:00:00 2001 From: stemangiola Date: Thu, 14 Sep 2023 13:41:57 +1000 Subject: [PATCH] relax tests --- tests/testthat/test-bulk_methods.R | 26 +++++++++---------- .../test-bulk_methods_SummarizedExperiment.R | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/testthat/test-bulk_methods.R b/tests/testthat/test-bulk_methods.R index 417c5827..d7c2d545 100755 --- a/tests/testthat/test-bulk_methods.R +++ b/tests/testthat/test-bulk_methods.R @@ -660,12 +660,12 @@ test_that("DESeq2 differential trancript abundance - no object",{ install.packages("BiocManager", repos = "https://cloud.r-project.org") BiocManager::install("DESeq2", ask = FALSE) } - + test_deseq2_df = DESeq2::DESeqDataSet(se_mini,design=~condition) colData(test_deseq2_df)$condition = factor(colData(test_deseq2_df)$condition) - + res_deseq2 = - test_deseq2_df |> + test_deseq2_df |> DESeq2::DESeq() |> DESeq2::results() @@ -835,13 +835,13 @@ test_that("DESeq2 differential trancript abundance - no object",{ test_that("differential trancript abundance - random effects",{ - my_input = + my_input = input_df |> identify_abundant(a, b, c, factor_of_interest = condition) |> mutate(time = time |> stringr::str_replace_all(" ", "_")) |> - + filter(b %in% c("ABCB4" , "ABCB9" , "ACAP1", "ACHE", "ACP5" , "ADAM28")) - + my_input |> test_differential_abundance( ~ condition + (1 + condition | time), @@ -849,7 +849,7 @@ test_that("differential trancript abundance - random effects",{ .transcript = b, .abundance = c, method = "glmmseq_lme4", - action="only", + action="only", cores = 1 ) |> pull(P_condition_adjusted) |> @@ -860,13 +860,13 @@ test_that("differential trancript abundance - random effects",{ ) # Custom dispersion - my_input = + my_input = my_input |> left_join( - my_input |> pivot_transcript(b) |> mutate(disp_ = 2 ), + my_input |> pivot_transcript(b) |> mutate(disp_ = 2 ), by = join_by(b, entrez, .abundant) ) - + my_input |> test_differential_abundance( @@ -875,15 +875,15 @@ test_that("differential trancript abundance - random effects",{ .transcript = b, .abundance = c, method = "glmmseq_lme4", - action="only", - cores = 1, + action="only", + cores = 1, .dispersion = disp_ ) |> pull(P_condition_adjusted) |> head(4) |> expect_equal( c(0.1081176, 0.1303558, 0.1303558, 0.1693276), - tolerance=1e-3 + tolerance=1e-2 ) }) diff --git a/tests/testthat/test-bulk_methods_SummarizedExperiment.R b/tests/testthat/test-bulk_methods_SummarizedExperiment.R index 067bd6bc..49366aed 100755 --- a/tests/testthat/test-bulk_methods_SummarizedExperiment.R +++ b/tests/testthat/test-bulk_methods_SummarizedExperiment.R @@ -518,7 +518,7 @@ test_that("differential trancript abundance - random effects SE",{ head(4) |> expect_equal( c(0.1153254, 0.1668555, 0.1668555 , NA), - tolerance=1e-3 + tolerance=1e-2 ) })