test_that("return gnomad_genome colnames", {
database.dir <- system.file("extdata", "demo", package = "anor")
chr <- c("chr1", "chr2", "chr1")
start <- c("10020", "10020", "10020")
end <- c("10020", "10020", "10020")
ref <- c("A", "A", "A")
alt <- c("-", "-", "-")
dat <- data.table(chr = chr, start = start, end = end, ref = ref, alt = alt)
x <- annotation(dat, "gnomad_exome", database.dir = database.dir, db.type = "txt")
expect_equal(is.na(x[1, gnomAD_exome_ALL]), TRUE)
expect_equal(length(colnames(x)), 9)
expect_equal(colnames(x)[1], "gnomAD_exome_ALL")
expect_equal(colnames(x)[9], "gnomAD_exome_SAS")
chr <- c("chr1", "chr2", "chr1")
start <- c("12198", "10020", "10020")
end <- c("12198", "10020", "10020")
ref <- c("G", "A", "A")
alt <- c("C", "-", "-")
dat <- data.table(chr = chr, start = start, end = end, ref = ref, alt = alt)
x <- annotation(dat, "gnomad_exome", database.dir = database.dir, db.type = "txt")
expect_equal(length(colnames(x)), 9)
expect_equal(colnames(x)[1], "gnomAD_exome_ALL")
expect_equal(colnames(x)[9], "gnomAD_exome_SAS")
expect_equal(x[1, gnomAD_exome_ALL], ".")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.