From 7a29eb140ad66a41d5976a2b884d014c76312f34 Mon Sep 17 00:00:00 2001 From: Diego Diez Date: Wed, 7 Feb 2024 14:44:04 +0900 Subject: [PATCH] Fix call to tidyverse functions. --- R/plot.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/plot.R b/R/plot.R index 0ffdcf2..fec35f1 100644 --- a/R/plot.R +++ b/R/plot.R @@ -494,9 +494,9 @@ plot_gene_modules.Seurat <- function(x, gene_modules, reduction=NULL, assay=NULL else modules <- unique(gene_modules$module) p <- lapply(modules, function(module) { - genes <- gene_modules |> filter(.data[["module"]] == !!module) |> pull(gene) + genes <- gene_modules |> filter(.data[["module"]] == !!module) |> pull("gene") means <- colMeans(exprs[genes, ]) - d <- cbind(coord, data.frame(score=means, module=module)) |> arrange(abs(score)) + d <- cbind(coord, data.frame(score=means, module=module)) |> arrange(abs(.data[["score"]])) ggplot(d, aes(.data[[coord.cols[1]]], .data[[coord.cols[2]]], color=.data[["score"]])) + geom_point(size=size) + scale_color_gradient2(low="blue", mid="lightgrey", high="red") +