From 3b2d1c1be83f2242313820413078e495d3b72322 Mon Sep 17 00:00:00 2001 From: Sudaraka88 Date: Wed, 17 Jul 2024 00:49:25 +1000 Subject: [PATCH] bug fix --- tests/testthat/test-pipeline.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-pipeline.R b/tests/testthat/test-pipeline.R index 27eac37..647711c 100644 --- a/tests/testthat/test-pipeline.R +++ b/tests/testthat/test-pipeline.R @@ -21,6 +21,7 @@ LDWeaver::LDWeaver(dset = "std", # path_to_folder = "tests/testthat" # This is for local testing path_to_folder = getwd() + idx = sample(100, 10) ths_mega = LDWeaver::read_TopHits(file.path(path_to_folder, "mega/Tophits/sr_tophits.tsv")) @@ -65,7 +66,7 @@ test_that("Long range all links", { # expect_equal(all.equal(al_mega, al_std), TRUE) expect_equal(all(apply(cbind(idx, sapply(idx, function(x) c(which((al_mega$pos1[x] == al_std$pos1) & (al_mega$pos2[x] == al_std$pos2)), which((al_mega$pos1[x] == al_std$pos2) & (al_mega$pos2[x] == al_std$pos1))))), - 1, function(x) all.equal(al_mega[x[1], c(3,5:ncol(al_mega))], al_std[x[2],c(3,5:ncol(al_std))]))), TRUE) + 1, function(x) all.equal( as.vector(al_mega[x[1], c(3,5:ncol(al_mega))]), as.vector(al_std[x[2],c(3,5:ncol(al_std))])))), TRUE) }) ## Try running on SNP only alignment