Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudaraka88 authored and Sudaraka88 committed Jul 16, 2024
1 parent a111abb commit 3b2d1c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testthat/test-pipeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3b2d1c1

Please sign in to comment.