tests/testthat/test_factors.R

context("factors")
test_that("bad factor in design throw errors", {
  dds <- makeExampleDESeqDataSet(n=100, m=6)
  levels(dds$condition) <- c("test-","test+")
  expect_error(DESeq(dds))

  dds <- makeExampleDESeqDataSet(n=100, m=6)
  dds$condition <- factor(rep(letters[1:3], each=2), ordered=TRUE)
  expect_error(DESeq(dds))
  mm <- model.matrix(~ condition, data=colData(dds))
  dds <- DESeq(dds, full=mm) # betaPrior=FALSE
})

Try the DESeq2 package in your browser

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

DESeq2 documentation built on Feb. 22, 2021, 10 a.m.