harmony icon indicating copy to clipboard operation
harmony copied to clipboard

Missing default random seed in RunHarmony()

Open frederikziebell opened this issue 4 years ago • 1 comments

RunHarmony() does not have a default random seed defined, e.g. consinder

library("Seurat")
pbmc_test <- SCTransform(pbmc_small)
pbmc_test1 <- RunHarmony(pbmc_test, 'groups', assay.use = 'SCT', nclust = 10)
pbmc_test2 <- RunHarmony(pbmc_test, 'groups', assay.use = 'SCT', nclust = 10)

all(
  pbmc_test1@[email protected]==
  pbmc_test2@[email protected]
)
# [1] FALSE

In order to have reproducible results and simplify debugging, I think it makes sense to just define a random seed (as e.g. Seurat::RunUMAP() does).

frederikziebell avatar Sep 23 '20 14:09 frederikziebell

Agreed, I set a seed beforehand with set.seed.

lucygarner avatar Oct 20 '22 13:10 lucygarner