diff --git a/R/greedyMix.R b/R/greedyMix.R index bab5649..38aeb8f 100644 --- a/R/greedyMix.R +++ b/R/greedyMix.R @@ -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( diff --git a/tests/testthat/test-greedyMix.R b/tests/testthat/test-greedyMix.R index 7e6da02..20380af 100644 --- a/tests/testthat/test-greedyMix.R +++ b/tests/testthat/test-greedyMix.R @@ -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")))