R/checks.R

Defines functions have_alternatives have_groups

have_groups = function(x) {
  return("clustering" %in% names(x))
}


have_alternatives = function(x) {
  list(
    "nmf"=sapply(get_types(x), function(tid)
      !purrr::is_empty(x$nmf[[tid]]$pyro$alternatives)),
    "clustering"=!purrr::is_empty(x$clustering$pyro$alternatives)
    )
}
caravagnalab/basilica documentation built on June 11, 2025, 10:18 p.m.