Skip to content

Commit

Permalink
fix tests for new Bioconductor
Browse files Browse the repository at this point in the history
  • Loading branch information
stemangiola committed Oct 16, 2024
1 parent a0bdd3f commit f62606a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/testthat/test-bulk_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test_that("Only scaled counts - no object",{
expect_equal(
unique(res$multiplier),
c(1.3078113, 1.1929933, 1.9014731, 0.9678922, 1.4771970),
tolerance=1e-3
tolerance=1e-2
)

expect_equal(
Expand Down Expand Up @@ -345,7 +345,7 @@ test_that("Only differential trancript abundance - no object",{
) |>
filter(FDR<0.05) |>
nrow() |>
expect_equal(169)
expect_equal(171)

})

Expand Down Expand Up @@ -603,7 +603,7 @@ test_that("Voom with treat method",{
res |>
filter(`adj.P.Val___cell_typeb_cell-cell_typemonocyte` < 0.05) |>
nrow() |>
expect_equal(293)
expect_equal(294)

res |>
filter(`adj.P.Val___cell_typeb_cell-cell_typet_cell`<0.05) |>
Expand Down Expand Up @@ -695,7 +695,7 @@ test_that("DESeq2 differential trancript abundance - no object",{
expect_equal(
unique(res$log2FoldChange)[1:4],
c(3.449740, 2.459516, 2.433466, 1.951263),
tolerance=1e-3
tolerance=1e-2
)

expect_equal(
Expand Down Expand Up @@ -2007,7 +2007,7 @@ test_that("filter abundant with design - no object",{
) |>
filter(.abundant) |>
nrow() |>
expect_equal(1965)
expect_equal(1970)



Expand Down
8 changes: 5 additions & 3 deletions tests/testthat/test-bulk_methods_SummarizedExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,14 @@ test_that("differential trancript abundance - SummarizedExperiment",{
as_tibble() |>
filter(FDR<0.05) |>
nrow() |>
expect_equal(169)
expect_equal(171)

})

test_that("differential trancript abundance - SummarizedExperiment - alternative .abundance",{

library(SummarizedExperiment)

assays(se_mini) = list(counts = assay(se_mini), bla = assay(se_mini))


Expand Down Expand Up @@ -440,7 +442,7 @@ test_that("differential trancript abundance - SummarizedExperiment - alternative
as_tibble() |>
filter(FDR<0.05) |>
nrow() |>
expect_equal(169)
expect_equal(171)

})

Expand Down Expand Up @@ -494,7 +496,7 @@ test_that("Voom with treat method",{
res |>
filter(adj.P.Val___Cell.typeb_cell.Cell.typemonocyte < 0.05) |>
nrow() |>
expect_equal(293)
expect_equal(294)

res |>
filter(adj.P.Val___Cell.typeb_cell.Cell.typet_cell < 0.05) |>
Expand Down

0 comments on commit f62606a

Please sign in to comment.