tests/testthat/testRegions.R

context("Region Alignment")

test_that("finalRegions is consistent", {
    peaks.path <- system.file(file.path("extdata","peaks","RData"),
                            package="DEScan2")
    peaks.file <- list.files(peaks.path, full.names=TRUE, pattern="rds$")
    peaksGRL <- readRDS(peaks.file)
    finalRegions <- finalRegions(peakSamplesGRangesList=peaksGRL,
                            zThreshold=10, minCarriers=3,
                            saveFlag=FALSE, verbose=TRUE)
    regionspath <- system.file(file.path("extdata","regions"),
                               package="DEScan2")
    regionsfile <- list.files(regionspath, full.names=TRUE, pattern="rds$")
    expect_equal_to_reference(finalRegions, file=regionsfile)
})

Try the DEScan2 package in your browser

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

DEScan2 documentation built on Nov. 8, 2020, 5:01 p.m.