Skip to content

Commit

Permalink
Updated individual value checks in unit tests after pipeline revision
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthkr committed Jun 18, 2023
1 parent 89510ac commit 076b6d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-optimisation.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test_that("calc_overlapping_percent works", {

test_that("objective_fun works", {
# Expected outputs
expect_equal(objective_fun(all_data, 2.75, 3.6, 0.5), -10.56, tolerance = 1e-2)
expect_equal(objective_fun(all_data, 2.75, 3.6, 0.5), -11.19, tolerance = 1e-2)
expect_equal(objective_fun(all_data), -999)
})

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-registration.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ test_that("register (with optimisation) works", {
expect_equal(colnames(data_reg), c("gene_id", "accession", "expression_value", "replicate", "timepoint", "timepoint_reg"))
expect_equal(colnames(model_comparison), c("gene_id", "BIC_separate", "BIC_combined", "stretch", "shift", "registered"))
expect_equal(model_comparison$registered, TRUE)
expect_equal(model_comparison$stretch, 2.955, tolerance = 1e-2)
expect_equal(model_comparison$shift, 0.289, tolerance = 1e-2)
expect_equal(model_comparison$stretch, 2.809, tolerance = 1e-2)
expect_equal(model_comparison$shift, 0.143, tolerance = 1e-2)
expect_error(register(gene_data, reference = "Ro19", query = "Col0"))
})

0 comments on commit 076b6d3

Please sign in to comment.