tests/testthat/test-check_cds.R

test_that("default settings works correctly", {
  x <- Biostrings::DNAStringSet(c("ATGATGTAA", "ATGATGTAA", "ATGATG"))
  y <- check_cds(x)
  expect_equal(as.character(y), rep('ATG', 2))
})

test_that("works for a single sequence", {
    x <- Biostrings::DNAStringSet(c("ATGATGTAA"))
    y <- check_cds(x)
    expect_equal(as.character(y), 'ATG')
})

test_that("input has more than sequence but only one satisfy all criteria", {
    x <- Biostrings::DNAStringSet(c("ATGATGTAA", "ATGATG"))
    y <- check_cds(x)
    expect_equal(as.character(y), 'ATG')
})

Try the cubar package in your browser

Any scripts or data that you put into this service are public.

cubar documentation built on April 3, 2025, 8:58 p.m.