File: test-mut_type.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 (18 lines) | stat: -rw-r--r-- 461 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
context("test-mut_type")

# Read vcfs
vcfs <- readRDS(system.file("states/read_vcfs_as_granges_output.rds",
  package = "MutationalPatterns"
))
# Get mut type
output <- mut_type(vcfs[[1]])

# Unit tests
test_that("Output has correct class", {
  expect_true(inherits(output, c("character")))
})

test_that("The 6 base mutation types are returned", {
  base_types <- sort(unique(output))
  expect_equal(base_types, c("C>A", "C>G", "C>T", "T>A", "T>C", "T>G"))
})