tests/testthat/test-plotting-funcs.R

## Tests for recomputeSignalFromRatios()
## library(TPP2D); library(testthat); source("setup-2dtpp-dataset.R"); source("test-recompute-signal.R")
context("plot functions")

test_that("plot2dTppProfile generates ggplot object", {
  gg_profile <- plot2dTppProfile(simulated_cell_extract_df, "protein1")
  expect_identical(class(gg_profile), c("gg", "ggplot"))
})

test_that("plot2dTppProfile generates ggplot object", {
  gg_rel_profile <- plot2dTppRelProfile(simulated_cell_extract_df, "protein1")
  expect_identical(class(gg_rel_profile), c("gg", "ggplot"))
})

test_that("plot2dTppFcHeatmap generates ggplot object", {
    gg_rel_heatmap <- plot2dTppFcHeatmap(
        simulated_cell_extract_df, "tp2", drug_name = "drug1")
    expect_identical(class(gg_rel_heatmap), c("gg", "ggplot"))
})

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.