From 673f41f1f52c2eafd8456d1e5b2dc9c0d3fdeb60 Mon Sep 17 00:00:00 2001 From: Massimo Andreatta Date: Mon, 6 Nov 2023 18:13:11 +0100 Subject: [PATCH] Fix example for SmoothKNN --- DESCRIPTION | 2 +- R/SmoothKNN.R | 2 +- man/SmoothKNN.Rd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cb622aa..ebf7d59 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: UCell Type: Package Title: Rank-based signature enrichment analysis for single-cell data -Version: 2.7.1 +Version: 2.7.2 Authors@R: c( person('Massimo', 'Andreatta', email = 'massimo.andreatta@unil.ch', diff --git a/R/SmoothKNN.R b/R/SmoothKNN.R index 5666122..9f00d5e 100644 --- a/R/SmoothKNN.R +++ b/R/SmoothKNN.R @@ -44,7 +44,7 @@ #' # Calculate UCell scores #' obj <- AddModuleScore_UCell(obj,features = gene.sets, name=NULL) #' # Run PCA -#' obj <- FindVariableFeatures(obj) |> ScaleData() |> RunPCA() +#' obj <- FindVariableFeatures(obj) |> NormalizeData() |> ScaleData() |> RunPCA() #' # Smooth signatures #' obj <- SmoothKNN(obj, reduction="pca", signature.names=names(gene.sets)) #' head(obj[[]]) diff --git a/man/SmoothKNN.Rd b/man/SmoothKNN.Rd index c340310..fa7b2d8 100644 --- a/man/SmoothKNN.Rd +++ b/man/SmoothKNN.Rd @@ -115,7 +115,7 @@ obj <- Seurat::CreateSeuratObject(sample.matrix) # Calculate UCell scores obj <- AddModuleScore_UCell(obj,features = gene.sets, name=NULL) # Run PCA -obj <- FindVariableFeatures(obj) |> ScaleData() |> RunPCA() +obj <- FindVariableFeatures(obj) |> NormalizeData() |> ScaleData() |> RunPCA() # Smooth signatures obj <- SmoothKNN(obj, reduction="pca", signature.names=names(gene.sets)) head(obj[[]])