vs_search_exact writes OTU table to file when otutabout is path

vs_search_exact returns alignment tibble with default userfields

test_that("vs_sintax fails with invalid strand", {
test_that("vs_sintax errors if input fasta file does not exist", {
vs_sintax(fasta_input = fake_fasta, database = db_file),
test_that("vs_sintax errors if input database file does not exist", {
vs_sintax(fasta_input = fasta_input, database = fake_db),
paste("Cannot find input file:", normalizePath(fake_db, mustWork = FALSE)))
test_that("vs_sintax returns expected columns in classification", {
result <- vs_sintax(fasta_input = fasta_file, database = db_file)
expect_true(all(c("Header", "domain", "phylum", "class", "order",
"family", "genus", "species") %in% names(result)))
test_that("vs_sintax writes output to file if outfile is specified", {
outfile <- withr::local_tempfile(fileext = ".txt")
result <- vs_sintax(fasta_input = fasta_file,
out_tbl <- read.table(outfile, header = TRUE)
test_that("vs_sintax creates logfile if specified", {
vs_sintax(fasta_input = fasta_file, database = db_file, logfile = log_file)
test_that("vs_sintax accepts additional vsearch_options", {
test_that("vs_sintax errors when database tibble lacks required columns", {
fake_db <- tibble::tibble(ID = "A", Seq = "ATCG")
"FASTA data base must contain columns: Header and Sequence"
test_that("make_sintax_db produces a database", {
test_that("make_sintax_db errors when required columns are missing", {
"must have a column named Header, with a unique text for each sequence"
"must have a column named Sequence, with the sequences"
test_that("taxonomy_tree errors when required columns are missing", {
df <- tibble::tibble(Header = "seq1", domain = "Bacteria")
expect_error(taxonomy_tree(df), "must have a column named phylum")
test_that("taxonomy_tree returns a phylo object", {
test_that("taxonomy_tree filters low-confidence taxa", {
filtered <- taxonomy_tree(tbl, confidence = 0.95)
test_that("vs_sintax returns empty data.frame when no classification match", {
fasta_input <- tibble::tibble(Header = "unknown", Sequence = "NNNNNNNNNN")
result <- vs_sintax(fasta_input = fasta_input, database = db_file)
test_that("vs_sintax works with database as tibble", {
fasta_input <- tibble::tibble(Header = "seq1", Sequence = "ACGTACGT")
result <- vs_sintax(fasta_input = fasta_input, database = database)
test_that("vs_sintax includes randseed argument", {
result <- vs_sintax(fasta_input = fasta_file, database = db_file, randseed = 123)