tests/testthat/test_TFFM.R

test_that("test_readXMLTFFM", {
    xmlFirst <- file.path(system.file("extdata", package = "TFBSTools"), 
        "tffm_first_order.xml")
    tffmFirst <- readXMLTFFM(xmlFirst, type = "First")
    expect_identical(17L, length(tffmFirst@emission))
    expect_identical(c(17L, 16L), dim(tffmFirst@transition))
    expect_equal(8.744361, sum(totalIC((tffmFirst))), tolerance=1e-5)
    xmlDetail <- file.path(system.file("extdata", package = "TFBSTools"), 
        "tffm_detailed.xml")
    tffmDetail <- readXMLTFFM(xmlDetail, type = "Detail")
    expect_identical(64L, length(tffmDetail@emission))
    expect_identical(c(64L, 64L), dim(tffmDetail@transition))
    expect_equal(7.745002, sum(totalIC((tffmDetail))), tolerance=1e-5)
})

Try the TFBSTools package in your browser

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

TFBSTools documentation built on Nov. 8, 2020, 8:14 p.m.