diff --git a/R/liger.R b/R/liger.R index d67fec2f..f73c3118 100644 --- a/R/liger.R +++ b/R/liger.R @@ -1615,6 +1615,9 @@ quantileAlignSNF.list <- function( set.seed(seed = NULL) id.number <- sample(x = 1000000:9999999, size = 1) } + is.defined <- function(sym) class(try(sym, TRUE))!='try-error' + if(!is.defined(resolution)){stop("'resolution' is not properly defined")} + if(!is.finite(resolution)){stop("'resolution' is not properly defined")} idents <- snf$idents Hs <- object idents.rest <- SLMCluster( @@ -4467,4 +4470,4 @@ convertOldLiger = function(object, override.raw = F) { # class has slots that this particular object does not print(paste0('New slots not filled: ', setdiff(slots_new[slots_new != "cell.data"], slots))) return(new.liger) -} \ No newline at end of file +}