File: test-signature_potential_damage_analysis.R

package info (click to toggle)
r-bioc-mutationalpatterns 3.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,336 kB
  • sloc: sh: 8; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
context("test-signature_potential_damage_analysis")

# Get the signatures
signatures <- get_known_signatures()

# Get the contexts
mut_mat <- readRDS(system.file("states/mut_mat_data.rds",
  package = "MutationalPatterns"
))

contexts <- rownames(mut_mat)[1:6]

# Get context mismatches
context_mismatches <- readRDS(system.file("states/context_mismatches.rds",
  package = "MutationalPatterns"
))

# Run function
output <- signature_potential_damage_analysis(signatures, contexts, context_mismatches)

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

test_that("Output has correct size", {
  expect_equal(dim(output), c(240, 7))
})