tests/testthat/test_plotHist.R

test_that("plotHist gives a ggplot object with correct data to plot", {
    file <- system.file("extdata", "ex1.bam", package="Rsamtools")
    win <- getStrandFromBamFile(file)
    g <- plotHist(win, groupBy = "Type")
    expect_is(g,"ggplot")
    expect_equal(names(g$data),c("Type","PosProp","Coverage","ReadCountProp"))
})
UofABioinformaticsHub/strandCheckR documentation built on Aug. 15, 2021, 9:08 a.m.