diff --git a/R/Seurat.Utils.Metadata.R b/R/Seurat.Utils.Metadata.R index 0d52dcc..c048b93 100644 --- a/R/Seurat.Utils.Metadata.R +++ b/R/Seurat.Utils.Metadata.R @@ -1624,7 +1624,12 @@ transferLabelsSeurat <- function( stopifnot(file.exists(reference_path)) reference_obj <- readr::read_rds(reference_path) } else { - stopifnot(inherits(reference_obj, "Seurat") & min(dim(reference_obj)) > 10) + stopifnot( + inherits(reference_obj, "Seurat"), + min(dim(reference_obj)) > 10, + reference_ident %in% colnames(reference_obj@meta.data) + ) + } # Report diff --git a/R/Seurat.Utils.R b/R/Seurat.Utils.R index e9aeea2..6d4436a 100644 --- a/R/Seurat.Utils.R +++ b/R/Seurat.Utils.R @@ -112,6 +112,11 @@ processSeuratObject <- function(obj, param.list = p, add.meta.fractions = FALSE, obj <- addGeneClassFractions(obj) } # end if add.meta.fractions + if("data" %!in% Layers(obj.Pati)) { + message("------------------- NormalizeData -------------------") + obj <- Seurat::NormalizeData(object = obj) + } + message("------------------- FindVariableFeatures -------------------") tic("FindVariableFeatures")