tests/testthat/test_plottingFunctions.R

library(DESeq2)
#library(ggplot2)

context("DChIPRep plotting functions")

test_that("plottingFunctions_work", {
    data(testData)
    dcr <- DChIPRepResults(testData)
    dcr <- runTesting(dcr)

    resS <-plotSignificance(dcr)
    resP <-plotProfiles(dcr)

    expect_is(resS, "ggplot")
    expect_is(resP, "ggplot")
})


test_that("plottingFunctions_work_without_replicates", {
  data(testData)
  dcr <- DChIPRepResults(testData[, 3:4])
  
  # since version 1.22 one has to change the design explicitly
  dds <- DESeq2Data(dcr)
  design(dds) <- ~ 1
  DESeq2Data(dcr) <- dds
  
  dcr <- runTesting(dcr)
  
  resS <-plotSignificance(dcr)
  resP <-plotProfiles(dcr)
  
  expect_is(resS, "ggplot")
  expect_is(resP, "ggplot")
})

Try the DChIPRep package in your browser

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

DChIPRep documentation built on April 29, 2020, 4:26 a.m.