# Generated by roxytest: do not edit by hand!
# File R/show_sig_profile.R: @testexamples
test_that("Function show_sig_profile() @ L107", {
# Load SBS signature
load(system.file("extdata", "toy_mutational_signature.RData",
package = "sigminer", mustWork = TRUE
))
# Show signature profile
p1 <- show_sig_profile(sig2, mode = "SBS")
p1
# Use 'y_tr' option to transform values in y axis
p11 <- show_sig_profile(sig2, mode = "SBS", y_tr = function(x) x * 100)
p11
# Load copy number signature from method "W"
load(system.file("extdata", "toy_copynumber_signature_by_W.RData",
package = "sigminer", mustWork = TRUE
))
# Show signature profile
p2 <- show_sig_profile(sig,
style = "cosmic",
mode = "copynumber",
method = "W",
normalize = "feature"
)
p2
# Visualize rearrangement signatures
s <- get_sig_db("RS_Nik_lab")
ss <- s$db[, 1:3]
colnames(ss) <- c("Sig1", "Sig2", "Sig3")
p3 <- show_sig_profile(ss, mode = "RS", style = "cosmic")
p3
expect_s3_class(p1, "ggplot")
expect_s3_class(p11, "ggplot")
expect_s3_class(p2, "ggplot")
expect_s3_class(p3, "ggplot")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.