File: test-plot_192_profile.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 (25 lines) | stat: -rw-r--r-- 797 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
20
21
22
23
24
25
context("test-plot_192_profile")

# Load mutation matrix
mut_mat_s <- readRDS(system.file("states/mut_mat_s_data.rds",
  package = "MutationalPatterns"
))

# Plot profile for some of the samples
output <- plot_192_profile(mut_mat_s[, c(1, 4, 7)])

# You can create a more condensed version of the plot
output_condensed <- plot_192_profile(mut_mat_s[, c(1, 4, 7)], condensed = TRUE)

# Load extracted signatures and plot
nmf_res_strand <- readRDS(system.file("states/nmf_res_strand_data.rds",
  package = "MutationalPatterns"
))
output_signatures <- plot_192_profile(nmf_res_strand$signatures)

# Perform tests
test_that("Output has correct class", {
  expect_true(inherits(output, c("gg")))
  expect_true(inherits(output_condensed, c("gg")))
  expect_true(inherits(output_signatures, c("gg")))
})