edward130603 / BayesSpace

Bayesian model for clustering and enhancing the resolution of spatial gene expression experiments.
http://edward130603.github.io/BayesSpace
Other
96 stars 20 forks source link

Error when running the spatialEnhance function #87

Open madhavitippani opened 1 year ago

madhavitippani commented 1 year ago

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.

edward130603 commented 1 year ago

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