kstreet13 / slingshot

Functions for identifying and characterizing continuous developmental trajectories in single-cell data.
259 stars 42 forks source link

Error in shortest_paths when trying to run slingshot #184

Closed YaelEfraim closed 2 years ago

YaelEfraim commented 2 years ago

Hi, I am trying to run slingshot on my Seurat object using the following code:

sds <- slingshot(Embeddings(Epi_wt, "umap"), clusterLabels = Epi_wt$seurat_clusters,start.clus = 7, stretch = 0)

I keep getting the following error: Error in shortest_paths(tree, from = cur.root, to = setdiff(deg1, cur.root)) : At core/paths/dijkstra.c:360 : Weight vector must not contain NaN values, Invalid value

not sure what am I doing wrong/ what could be wrong with my dataset, It runs perfectly on other Seuratobjects

Thanks, Yael

kstreet13 commented 2 years ago

Hi @YaelEfraim,

That's a very interesting problem. My guess is that this is somehow coming from TrajectoryUtils::defineMSTPaths, but I'm not sure what's causing it. I'm also not able to reproduce it, so would you be able/willing to share some data and code that gives this error?

Also worth asking, what version of Slingshot are you using? Sometimes updating to the latest version solves things without needing to get to the bottom of it.

Best, Kelly

YaelEfraim commented 2 years ago

Hi Kelly, Thank you for the quick response! I was able to get slingshot to work by creating my Seurat object again from scratch, not sure what was wrong with it the first time.
Thanks, Yael

kstreet13 commented 2 years ago

Hm, fair enough. If you ever figure out what was causing the problem, please do let me know.