tests/testthat/test_SigProfiler_formats.R

context("Reading and writing SigProfiler formatted Indel catalogs.")

test_that("Read SigProfiler", {
  sp.cat <-
    ReadCatalog(
      "testdata/sigProfiler_ID_signatures.csv")
  expect_equal(dim(sp.cat), c(83, 17))
})

test_that("Write SigProfiler",{
  
  ICAMS.cat <- 
    ReadCatalog(
      "testdata/BTSG_WGS_PCAWG.indels.csv")
  
  ## Write Catalog in SigPro format
  WriteCatalogIndelSigPro(
    ICAMS.cat,
    "testdata/indels.sp.csv")
  
  ## Read Catalog in SigPro format, 
  ## obtain an ICAMS-formatted catalog matrix.
  ICAMS.cat.reread <-
    ReadCatalog(
      "testdata/indels.sp.csv")

  
  ## Expect converted catalog to be equal to
  ## original catalog.
  expect_equal(ICAMS.cat,ICAMS.cat.reread)
  
  unlink("testdata/indels.sp.csv")
})

Try the ICAMS package in your browser

Any scripts or data that you put into this service are public.

ICAMS documentation built on April 3, 2021, 5:07 p.m.