tests/testthat/test_sample_sites.R

context("sample_sites()")

test_that("site sampling works", {

  m <- create_motif("AAAAA", nsites = 100)
  s <- sample_sites(m)

  m2 <- create_motif(create_sequences("RNA", seqlen = 10), add.multifreq = 2)
  s2 <- sample_sites(m2, use.freq = 2)

  expect_true(all(as.character(s) == "AAAAA"))

  expect_s4_class(s2, "RNAStringSet")

})

Try the universalmotif package in your browser

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

universalmotif documentation built on April 8, 2021, 6 p.m.