Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Nov 25, 2024
1 parent 74a8d4e commit f0d0988
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/Seurat.Utils.Metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions R/Seurat.Utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f0d0988

Please sign in to comment.