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

# Generated by roxytest: do not edit by hand!

# File R/sig_unify_extract.R: @testexamples

test_that("Function sig_unify_extract() @ L41", {
  
  
  load(system.file("extdata", "toy_copynumber_tally_W.RData",
    package = "sigminer", mustWork = TRUE
  ))
  # Extract signatures
  # It is same as sig_extract(cn_tally_W$nmf_matrix, 2, nrun = 1)
  res <- sig_unify_extract(cn_tally_W$nmf_matrix, 2,
    nrun = 1,
    approach = "repeated_nmf"
  )
  # Auto-extract signatures based on bayesian NMF
  res2 <- sig_unify_extract(cn_tally_W$nmf_matrix,
    nrun = 1,
    approach = "bayes_nmf"
  )
  
  expect_s3_class(res, "Signature")
  expect_s3_class(res2, "Signature")
})
ShixiangWang/sigminer documentation built on March 16, 2024, 12:30 p.m.