# Generated by roxytest: do not edit by hand!
# File R/get_sig_similarity.R: @testexamples
test_that("Function get_sig_similarity() @ L102", {
# Load mutational signature
load(system.file("extdata", "toy_mutational_signature.RData",
package = "sigminer", mustWork = TRUE
))
s1 <- get_sig_similarity(sig2, Ref = sig2)
s1
s2 <- get_sig_similarity(sig2)
s2
s3 <- get_sig_similarity(sig2, sig_db = "SBS")
s3
# Set order for result similarity matrix
s4 <- get_sig_similarity(sig2, sig_db = "SBS", set_order = TRUE)
s4
## Remove some components
## in similarity calculation
s5 <- get_sig_similarity(sig2,
Ref = sig2,
pattern_to_rm = c("T[T>G]C", "T[T>G]G", "T[T>G]T")
)
s5
## Same to DBS and ID signatures
x1 <- get_sig_db("DBS_hg19")
x2 <- get_sig_db("DBS_hg38")
s6 <- get_sig_similarity(x1$db, x2$db)
s6
expect_equal(length(s1), 4L)
expect_equal(length(s2), 4L)
expect_equal(length(s3), 4L)
expect_equal(length(s4), 4L)
expect_equal(length(s5), 4L)
expect_is(s6, "list")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.