tests/testthat/test-bootstrap-null.R

## Tests for recomputeSignalFromRatios()
## library(TPP2D); library(testthat); source("setup-2dtpp-dataset.R"); source("test-bootstrap-null.R")
context("bootstrap null")

# test_that("bootstrapNull works as expected", {
#   boot_df <- bootstrapNull(simulated_cell_extract_df %>% 
#                              filter(clustername == "tp1"),
#                            B = 3)
#   expect_equal(nrow(boot_df), 3)
# })

test_that("bootstrapNullAlternativeModel works as expected", {
    
    sub_df <- simulated_cell_extract_df %>% 
        filter(clustername == "tp1")
    params_df <- getModelParamsDf(sub_df)
    boot_df <- bootstrapNullAlternativeModel(
        df = sub_df,
        params_df = params_df,
        B = 3)
    expect_equal(nrow(boot_df), 3)
})

Try the TPP2D package in your browser

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

TPP2D documentation built on Nov. 8, 2020, 4:54 p.m.