BayesSpace icon indicating copy to clipboard operation
BayesSpace copied to clipboard

Error when running the spatialEnhance function

Open madhavitippani opened this issue 1 year ago • 1 comments

spec = spatialEnhance(spec, q = 17, platform = "Visium", use.dimred = "HARMONY", nrep = 100, init = "kmeans", burn.in = 10) Error: Elements 1, 2 of cols %in% colnames(colData(sce)) are not true

The spec object has both imagerow/imagecol and arrayrow/arraycol columns.

madhavitippani avatar Aug 03 '22 20:08 madhavitippani

Does the spec object have a spatial.cluster column? spatialEnhance defaults to using that column for initialization unless you have a different init vector of length equal to number of spots supplied to init or specify an init.method of either "kmeans" or "mclust".

EDIT: re-read your code, try supplying init.method = "kmeans" instead of init

edward130603 avatar Aug 09 '22 05:08 edward130603