tests/testthat/test_testConstructor.R

library(S4Vectors)
library(DESeq2)

context("DChIPRepResults constructor and accesors testing")

test_that("constructor_works", {
  countData <- matrix(1:100,ncol=4)
  condition <- factor(c("A","A","B","B"))
  dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), ~ condition)
  res <- DChIPRepResults(dds)
  expect_true(class(res) ==  "DChIPRepResults" )
})


test_that("data_accessor_works", {
  countData <- matrix(1:100,ncol=4)
  condition <- factor(c("A","A","B","B"))
  dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), ~ condition)
  res <- DChIPRepResults(dds)
  expect_true(class(DESeq2Data(res)) ==  "DESeqDataSet" )
})


test_that("show_method_works", {
  countData <- matrix(1:100,ncol=4)
  condition <- factor(c("A","A","B","B"))
  dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), ~ condition)
  dds <- estimateSizeFactors(dds)
  res <- DChIPRepResults(dds)
  res <- runTesting(res)
  res
})

Try the DChIPRep package in your browser

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

DChIPRep documentation built on Nov. 1, 2018, 2:59 a.m.