Skip to content

Commit

Permalink
remove test matching size
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristianetaniguti committed Nov 25, 2022
1 parent 2785e8f commit 63ce0b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,5 @@ Taniguti, C. H., Taniguti, L. M., Amadeu, R. R., Mollinari, M., Da, G., Pereira,
* Optimization of find_bins and map_avoid_unlinked
* New function to save RAM memory after filters: keep_only_selected_mks
* Review spell_check
* Avoid -Inf likelihood result increasing the tolerance value
* Avoid -Inf likelihood result by increasing the tolerance value
* Fix bug in mds_onemap
23 changes: 8 additions & 15 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ context("Utils functions")


test_that("Combine and split datasets", {
check_combine <- function(data1, data2, n.ind, n.mks, obj.size.start, obj.size.end){
check_combine <- function(data1, data2, n.ind, n.mks, n_mk.end){

eval(bquote(data(.(data1))))
eval(bquote(data(.(data2))))
Expand Down Expand Up @@ -33,43 +33,36 @@ test_that("Combine and split datasets", {
seq1 <- make_seq(out_2pts, c(1:14))
seq2 <- make_seq(out_2pts, c(14:23))
list.sequences <- list(seq1, seq2)
size.start <- as.numeric(object.size(list.sequences))

eval(bquote(expect_equal(size.start, .(obj.size.start))))


new.seqs <- keep_only_selected_mks(list.sequences)
size <- as.numeric(object.size(new.seqs))
n_mk <- dim(new.seqs[[1]]$twopt$data.name$geno)[2]

eval(bquote(expect_equal(size, .(obj.size.end))))
eval(bquote(expect_equal(n_mk, .(n_mk.end))))
}

check_combine(data1 = "onemap_example_out",
data2 = "vcf_example_out",
n.ind = 100,
n.mks = 54,
obj.size.start = 1157920,
obj.size.end = 1111056)
n_mk.end = 23)

check_combine(data1 = "onemap_example_f2",
data2 = "vcf_example_f2",
n.ind = 200,
n.mks = 91,
obj.size.start = 2346832,
obj.size.end = 2163040)
n_mk.end = 23)

check_combine(data1 = "onemap_example_bc",
data2 = "vcf_example_bc",
n.ind = 150,
n.mks = 92,
obj.size.start = 1719360,
obj.size.end = 1586176)
n_mk.end = 23)

check_combine(data1 = "onemap_example_riself",
data2 = "vcf_example_riself",
n.ind = 100,
n.mks = 93,
obj.size.start = 1139696,
obj.size.end = 1051648)
n_mk.end = 23)
})


Expand Down

0 comments on commit 63ce0b6

Please sign in to comment.