Skip to content

Commit

Permalink
Merge pull request #61 from KristinaGomoryova/fix_60
Browse files Browse the repository at this point in the history
Unit test for overall findRecalSeries function
  • Loading branch information
hechth authored Sep 13, 2024
2 parents b5ce0bf + 46f7b4a commit a6f140c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Binary file added tests/testthat/test-data/findRecalSeriesFALSE.rds
Binary file not shown.
Binary file added tests/testthat/test-data/findRecalSeriesTRUE.rds
Binary file not shown.
18 changes: 18 additions & 0 deletions tests/testthat/test-findRecalSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,21 @@ patrick::with_parameters_test_that("Selection of the final series works", {
},
mode = c(TRUE, FALSE)
)

patrick::with_parameters_test_that("FindRecalSeries function works", {
df <- readRDS("test-data/pos_recallist.rds")
expected <- readRDS(file.path("test-data", paste0("findRecalSeries", mode, ".rds")))
n <- 3

actual <- FindRecalSeries(df,
global_min = 100,
global_max = 500,
number_of_combinations = 3,
abundance_score_threshold = 100,
peak_distance_threshold = 2,
coverage_threshold = 60,
fill_series = mode)
expect_equal(actual, expected)
},
mode = c(TRUE, FALSE)
)

0 comments on commit a6f140c

Please sign in to comment.