tests/testthat/test_hmm.R

library(srnadiff)
library(testthat)

context("Checking HMM strategy")

object    <- srnadiffExample()
parameters(object) <- srnadiffDefaultParameters
counts    <- buildDataHmm(object)
pvalues   <- computePvalues(object, counts, 1)
intervals <- hmm(object, counts, pvalues)

test_that("Building data", {
    expect_equal(dim(counts), c(271, 6))
})

test_that("Computing p-values", {
    expect_equal(length(pvalues), 271)
})

test_that("Running HMM", {
    expect_equal(length(intervals), 20)
})

Try the srnadiff package in your browser

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

srnadiff documentation built on Jan. 7, 2021, 2 a.m.