context("test-reverse_translate")
test_that("length output 3 times input", {
expect_equal(nchar(reverse_translate(amino_acid_seq = minimal_aa_seq, codon_tbl = minimal_freq_tbl)),
3 * nchar(minimal_aa_seq))
expect_equal(nchar(reverse_translate(amino_acid_seq = "X", codon_tbl = minimal_freq_tbl)),
3 * nchar("X"))
})
test_that("lower okay", {
expect_equal(nchar(reverse_translate(amino_acid_seq = tolower(minimal_aa_seq), codon_tbl = minimal_freq_tbl)),
3 * nchar(minimal_aa_seq))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.