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

## Get indel counts
indel_counts <- readRDS(system.file("states/blood_indel_counts.rds",
  package = "MutationalPatterns"
))

## Plot contexts
output <- plot_indel_contexts(indel_counts)
output_same_y <- plot_indel_contexts(indel_counts, same_y = TRUE)
output_extra_labels <- plot_indel_contexts(indel_counts, extra_labels = TRUE)
output_condensed <- plot_indel_contexts(indel_counts, condensed = TRUE)

test_that("Output has correct class", {
  expect_true(inherits(output, c("gg")))
  expect_true(inherits(output_same_y, c("gg")))
  expect_true(inherits(output_extra_labels, c("gg")))
  expect_true(inherits(output_condensed, c("gg")))
})