From 1dab1480f4d2f4ed4d97635729d5cc03ea523fa2 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 17 Aug 2023 11:39:33 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ally Hawkins <54039191+allyhawkins@users.noreply.github.com> --- .../analysis/copykat-rms-exploration.Rmd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/celltype_annotation/analysis/copykat-rms-exploration.Rmd b/celltype_annotation/analysis/copykat-rms-exploration.Rmd index 129454b..29fe6f5 100644 --- a/celltype_annotation/analysis/copykat-rms-exploration.Rmd +++ b/celltype_annotation/analysis/copykat-rms-exploration.Rmd @@ -28,8 +28,8 @@ suppressPackageStartupMessages({ # define output path and SCE file output_dir <- here::here("celltype_annotation", - "analysis", - "copykat-results") + "analysis", + "copykat-results") fs::dir_create(output_dir) copykat_sce <- file.path(output_dir, @@ -86,19 +86,19 @@ if (file.exists(copykat_sce)) { purrr::walk( c("spearman", "pearson", "euclidean"), - \(x) { + \(distance_parameter) { copykat_result <- copykat( rawmat = as.matrix(counts(sce)), id.type = "E", # we have Ensembl gene ids, not the default gene symbols ("S") sam.name = params$library_id, - distance = x, + distance = distance_parameter, plot.genes = FALSE, n.cores = params$threads ) # save prediction to sce - colname <- glue::glue("copykat_{x}") + colname <- glue::glue("copykat_{distance_parameter}") colData(sce)[[colname]] <- copykat_result$prediction$copykat.pred # export full result