Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ally Hawkins <[email protected]>
  • Loading branch information
sjspielman and allyhawkins authored Aug 17, 2023
1 parent 0b9ba52 commit 1dab148
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions celltype_annotation/analysis/copykat-rms-exploration.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1dab148

Please sign in to comment.