tests/testthat/test-clonalAbundance.R

# test script for clonalAbundance.R - testcases are NOT comprehensive!

test_that("clonalAbundance works", {
  expect_doppelganger(
    "clonalAbundance_unscaled_plot",
    clonalAbundance(getCombined(), scale = FALSE)
  )
  
  expect_doppelganger(
    "clonalAbundance_scaled_plot",
    clonalAbundance(getCombined(), scale = TRUE)
  )
  
  combined <- getCombined()
  combined <- addVariable(getCombined(), 
                          variable.name = "Type", 
                          variables = rep(c("B", "L"), 4))
  expect_doppelganger(
    "clonalAbundance_group_plot",
    clonalAbundance(combined, group.by = "Type")
  )
  
})
#TODO Add grouping plot
ncborcherding/scRepertoire documentation built on May 13, 2024, 3:02 a.m.