tests/testthat/test-plotting.R

test_that("The plots produced match the snapshots", {
  obj = ingresAfterViper
  obj %<>% computePbnByCluster() %>% computePbnBySingleCell()
  cell.id = "sample1@ACAGCTAAGATCCCGC-1"
  cluster.id = "1"
  expect_snapshot_plot(
    "cellPbnPlotSnap",
    obj %>% cellPbnPlot(cell.id), 10, 15
  )
  expect_snapshot_plot(
    "clusterPbnPlotSnap",
    obj %>% clusterPbnPlot(cluster.id), 10, 15
  )
  expect_snapshot_plot(
    "clusterGenesHeatmapSnap",
    obj %>% clusterGenesHeatmap(), 10, 15
  )
  expect_snapshot_plot(
    "cellGenesHeatmapSnap",
    obj %>% cellGenesHeatmap(), 10, 15
  )
})

Try the ingres package in your browser

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

ingres documentation built on Sept. 14, 2022, 9:05 a.m.