-
Notifications
You must be signed in to change notification settings - Fork 54
/
test_summary_tables.R
49 lines (32 loc) · 1.03 KB
/
test_summary_tables.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
library(testthat)
#detach(package:vcfR, unload=TRUE)
library(vcfR)
context("summary_tables functions")
##### ##### ##### ##### #####
test_that("write.var.info works",{
data(vcfR_test)
myChrom <- create.chromR(vcfR_test, verbose = FALSE)
setwd(tempdir())
write.var.info(myChrom, file = "test_var_info.csv")
expect_true(file.exists("test_var_info.csv"))
unlink("test_var_info.csv")
})
test_that("write.var.info works, mask == TRUE",{
data(vcfR_test)
myChrom <- create.chromR(vcfR_test, verbose = FALSE)
setwd(tempdir())
write.var.info(myChrom, file = "test_var_info.csv", mask = TRUE)
expect_true(file.exists("test_var_info.csv"))
unlink("test_var_info.csv")
})
##### ##### ##### ##### #####
test_that("write.win.info works",{
data(vcfR_test)
myChrom <- create.chromR(vcfR_test, verbose = FALSE)
myChrom <- proc.chromR(myChrom, verbose = FALSE)
setwd(tempdir())
write.win.info(myChrom, file = "test_win_info.csv")
expect_true(file.exists("test_win_info.csv"))
unlink("test_win_info.csv")
})