tests/testthat/argChecking.R

library(xCombR)
context("Check arguments and error messages")

# x values ---------------------------------------------------------------------
prot <- c("AAAAAKAAAAAKIIIIII", "AAAAAKYYYYYKCCCCCC")
names(prot) <- c("A|Prot1 blah blah blah", "B|Prot2 more blah blah blah")
xSet <- Biostrings::AAStringSet(prot)

xString <- Biostrings::AAString("AAAKLLLLRIIII")
# tests ------------------------------------------------------------------------

test_that("x is a AAStringSet, or AAStringSetList", {
    expect_error(xcomb("AAAAKLLLL", "unable to find an inherited"))
    expect_error(xcomb(1, "unable to find an inherited"))
    expect_error(xcomb(T, "unable to find an inherited"))
    expect_success()
})


gaju <- AAString(c(a = "LAAGKVEDSDRDNA"))

a <- cleaver::cleave(gaju)
wfondrie/xcombr documentation built on May 7, 2019, 9:34 a.m.