tests/testthat/test_getRegexPattern.R

context("Test that getRegexPattern() function works correctly")
test_that("getRegexPattern() generates the correct regex pattern", {
    iupacSeq <- "ATCGTWWRRDHS"
    regexPattern <- getRegexPattern(iupacSeq, isDNA = TRUE)
    expect_equal(regexPattern, "ATCGT[AT][AT][AG][AG][AGT][ACT][GC]")

    iupacSeq <- "AUCGUWWRRDHS"
    regexPattern <- getRegexPattern(iupacSeq, isDNA = FALSE)
    expect_equal(regexPattern, "AUCGU[AU][AU][AG][AG][AGU][ACU][GC]")

})

Try the circRNAprofiler package in your browser

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

circRNAprofiler documentation built on March 6, 2021, 2 a.m.