tests/testthat/test_tppccrNormalize.R

datapath <- system.file("extdata", package="TPP")
load(file.path(datapath, "randomESet.Rdata"))

test_that("CCR_normalization_allOK", {
  datNormalized <- tppccrNormalize(data=list("Experiment_1"=exampleSet))
  mediansNew <- apply(Biobase::exprs(datNormalized[[1]]), 2, median, na.rm=T)
  expect_equal(unname(mediansNew), rep(1, ncol(exampleSet)))
})

test_that("CCR_normalization_wrongInput", {
  expect_error(tppccrNormalize(data=exampleSet))
})

Try the TPP package in your browser

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

TPP documentation built on Nov. 8, 2020, 5:55 p.m.