Skip to content

Commit

Permalink
changed from specific k18 for mean comparison of clusters in findArti…
Browse files Browse the repository at this point in the history
…facts, to tmp.name (the last K-size loop)
  • Loading branch information
Michael Totty authored and Michael Totty committed Mar 20, 2024
1 parent e757ebb commit 4772ff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/findArtifacts.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ findArtifacts <- function(spe, mito_percent="expr_chrM_ratio",
# =========== Artifact annotation ===========

# calculate average local variance of the two clusters
clus1_mean <- mean(colData(spe.temp)[[paste0("k", 18)]][spe.temp$Kmeans==1])
clus2_mean <- mean(colData(spe.temp)[[paste0("k", 18)]][spe.temp$Kmeans==2])
clus1_mean <- mean(colData(spe.temp)[[paste0("k", tmp.name)]][spe.temp$Kmeans==1])
clus2_mean <- mean(colData(spe.temp)[[paste0("k", tmp.name]][spe.temp$Kmeans==2])

artifact_clus <- which.min(c(clus1_mean, clus2_mean))

Expand Down

0 comments on commit 4772ff5

Please sign in to comment.