Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in spatialCluster #119

Open
littlecabiria opened this issue Jan 19, 2024 · 1 comment
Open

Error in spatialCluster #119

littlecabiria opened this issue Jan 19, 2024 · 1 comment

Comments

@littlecabiria
Copy link

Hi Team, just a quick question that it seems like there are some errors when I was running the spatialCluster() function. I supposed that there are some errors in my sce object but I still tried to find it. Could someone help me please?

>   sim_sce <- spatialPreprocess(
+     sim_sce,
+     platform = plat,
+     n.PCs = 7,
+     n.HVGs = 150,
+     skip.PCA = FALSE,
+     log.normalize = TRUE,
+     assay.type = "logcounts"
+   )
Warning message:
In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
  collapsing to unique 'x' values
>   single_sim_SRT <- BayesSpace::spatialCluster(sce=sim_sce, 
+                                    q=length(unique(real_sce@colData$spatial.cluster)), 
+                                    d=7, 
+                                    platform=plat, 
+                                    nrep=50000, 
+                                    gamma=2)
Neighbors were identified for 0 out of 278 spots.
Fitting model...
Error: Not compatible with requested type: [type=NULL; target=double].

false_sce.rds.zip

@edward130603
Copy link
Owner

edward130603 commented Jan 23, 2024

your simulated PCA matrix has a singular covariance matrix. probably need to change up your data generating steps to make it more realistic.

side note, BayesSpace isn't finding neighbors on your data here, so it won't end up doing any spatial smoothing. you will need to edit the code to detect neighbors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants