tests/testthat/test-roxytest-testexamples-sig_convert.R

# Generated by roxytest: do not edit by hand!

# File R/sig_convert.R: @testexamples

test_that("Function sig_convert() @ L42", {
  
  # Load SBS signature
  load(system.file("extdata", "toy_mutational_signature.RData",
    package = "sigminer", mustWork = TRUE
  ))
  # Exome-relative to Genome-relative
  sig_converted <- sig_convert(sig2,
    from = "human-exome",
    to = "human-genome"
  )
  sig_converted
  
  
  show_sig_profile(sig2, style = "cosmic")
  show_sig_profile(sig_converted, style = "cosmic")
  
  expect_is(sig_converted, "matrix")
  
  sig_converted2 <- sig_convert(sig2, from = "human-exome", to = "human-exome")
  expect_true(all.equal(sig2$Signature.norm, sig_converted2))
  
  sig_converted2 <- sig_convert(sig2, from = "human-genome", to = "human-genome")
  expect_true(all.equal(sig2$Signature.norm, sig_converted2))
})
ShixiangWang/sigminer documentation built on March 16, 2024, 12:30 p.m.