tests/testthat/test_construtors.r

library(heatmaps)
library(Biostrings)
context("test constructors")

pwm = matrix(runif(16), nrow=4)
pwm = log10(pwm/colSums(pwm))
rownames(pwm) = c("A", "C", "G", "T")

test_that("PWMScanHeatmap initialise default values", {
    seq = DNAStringSet("ATCGTACAGCATACAGACAT")
    hm = PWMScanHeatmap(seq, pwm)
    expect_equal(coords(hm), c(0, 20))
    expect_equal(label(hm), "")
})

Try the heatmaps package in your browser

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

heatmaps documentation built on Nov. 8, 2020, 7:32 p.m.