Fails for FAST input to greedyMix() (#24)

This is a desirable feature, but was not implemented in the original BAPS, so better leave it out until the original planned features is working.
This commit is contained in:
Waldir Leoncio 2024-04-08 13:14:54 +02:00
parent 6c3e2aff04
commit 6209bb33fa
2 changed files with 10 additions and 4 deletions

View file

@ -27,6 +27,9 @@ greedyMix <- function(
inp = NULL, popnames = NULL, fixedK = FALSE, verbose = FALSE
) {
# Importing and handling data ================================================
if (tolower(format) %in% "fasta") {
stop("FASTA format not yet supported on greedyMix")
}
if (tolower(format) %in% "baps") {
data <- process_BAPS_data(data, NULL)
c <- list(

View file

@ -57,12 +57,15 @@ test_that("Files are imported correctly", {
)
)
expect_equal(length(raw_bam[[1]]), 13)
expect_error(
greedyMix(
data = file.path(path_inst, "FASTA_clustering_haploid.fasta"),
format = "FASTA"
),
"FASTA format not yet supported on greedyMix"
)
})
df_fasta <- greedyMix(
data = file.path(path_inst, "FASTA_clustering_haploid.fasta"),
format = "FASTA"
)
test_that("greedyMix() works", {
expect_error(greedyMix(file.path(path_inst, "vcf_example.vcf")))
expect_error(greedyMix(file.path(path_inst, "bam_example.bam")))