context("LD")
library(simulateGP)
test_that("get ld matrix", {
skip("needs gwas files")
chr <- 1
from <- 1892607
to <- 3582736
bfile <- "/Users/gh13047/repo/mr-base-api/app/ld_files/EUR"
plink_bin <- genetics.binaRies::get_plink_binary()
a <- get_ld(chr, from, to, bfile, plink_bin)
expect_true(length(a) == 2)
expect_true(nrow(a[[1]]) == nrow(a[[2]]))
expect_true(nrow(a[[1]]) == ncol(a[[1]]))
})
test_that("test_ldobj", {
ldobj <- test_ldobj(nsnp=1050, chunksize=100)
expect_equal(length(ldobj), ceiling(1050/100))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.