Added SAM/BAM support (closes #18)

This commit is contained in:
Waldir Leoncio 2021-09-03 12:50:11 +02:00
parent 15f2cbcf08
commit 0cfd13b006
4 changed files with 27 additions and 6 deletions

View file

@ -46,12 +46,21 @@ df_vcf <- greedyMix(
format = "VCF",
verbose = FALSE
)
# TODO #17: add example reading VCF
# TODO #18: add example reading SAM
df_bam <- greedyMix(
data = file.path(path_inst, "bam_example.bam"),
format = "BAM",
)
# TODO #19: add example reading Genpop
test_that("Files are imported correctly", {
expect_equal(dim(df_fasta), c(5, 99))
expect_equal(dim(df_vcf), c(variants = 2, fix_cols = 8, gt_cols = 3))
expect_error(
greedyMix(
data = paste(path_inst, "sam_example.sam", sep="/"),
format = "SAM",
)
)
expect_equal(length(df_bam[[1]]), 13)
})
context("Linkage")