File: test_TFFM.R

package info (click to toggle)
r-bioc-tfbstools 1.44.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 948 kB
  • sloc: xml: 1,137; ansic: 590; asm: 54; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
})