tests/testthat/test-count_indel_contexts.R

context("test-count_indel_contexts")

## Get a GRangesList object with indel contexts.
grl_indel_context <- readRDS(system.file("states/blood_grl_indel_context.rds",
  package = "MutationalPatterns"
))

output <- count_indel_contexts(grl_indel_context)
expected <- readRDS(system.file("states/blood_indel_counts.rds",
  package = "MutationalPatterns"
))

test_that("Output has correct class", {
  expect_true(inherits(output, c("matrix")))
})

test_that("Output is identical to expected", {
  expect_identical(output, expected)
})
UMCUGenetics/MutationalPatterns documentation built on Nov. 24, 2022, 4:31 a.m.