-
Notifications
You must be signed in to change notification settings - Fork 43
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 with shortest_paths weight vector containing NaN values #186
Comments
Hi @No2Ross, Thanks for raising this issue! I'm guessing you saw the earlier issue where remaking the Seurat object was sufficient to make it go away, but I'm very curious about what's actually causing this. And yes, If you don't mind sharing (either here or via email), I would greatly appreciate the data frame you mentioned so that I can try to reproduce the error message. Thanks! |
Hi Kelly. Attatched the dataframe with the 8 dimension PHATE embeddings as well as the cluster IDs. I used cluster 5 as the starting point. Thanks for getting back to me! Ross |
Hi Kelly, Feel dumb now that it was the only problem with the code. Got rid of those cells from the object and it worked. Thanks for your help! Ross |
No problem! Thanks again for helping me diagnose that error message. |
Hi Kelly,
Matrix products: default Random number generation: locale: attached base packages: other attached packages: loaded via a namespace (and not attached): Thanks, |
@pagarwal14, have you checked to see if your error is also being caused by a small cluster? |
There is a cluster with one cell
table(cl1)
cl1
1 2 3 4 5 6 7
78 1 38 58 24 34 67
So I removed cluster 2 as follows:
clusters1 = cl1[cl1 %in% c(1,3,4,5,6,7)]
str(clusters1)
Named num [1:299] 1 1 1 1 1 1 1 1 1 1 ...
- attr(*, "names")= chr [1:299] "c1" "c2" "c3" "c4" ...
unique(cl1)
[1] 1 3 2 4 5 6 7
unique(clusters1)
[1] 1 3 4 5 6 7
colData(sce)$GMM <- clusters1
Error in `[[<-`(`*tmp*`, name, value = c(c1 = 1, c2 = 1, c3 = 1, c4 = 1, :
299 elements in value to replace 300 elements
Could you please suggest how to remove the cluster from the sce object?
Thanks
Pankaj
From: Kelly Street ***@***.***>
Sent: Tuesday, August 22, 2023 12:38 PM
To: kstreet13/slingshot ***@***.***>
Cc: Pankaj Agarwal ***@***.***>; Mention ***@***.***>
Subject: Re: [kstreet13/slingshot] Error with shortest_paths weight vector containing NaN values (Issue #186)
@pagarwal14<https://urldefense.com/v3/__https:/github.com/pagarwal14__;!!OToaGQ!vmKT2NiBWyhp2lpc-INgzkgr2mRztztxIrXV_rYltOhfe1IbN5j3eip9n0E6YD_ypCI_KccWbYCeD5EYJaxglhEKoA$>, have you checked to see if your error is also being caused by a small cluster?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/kstreet13/slingshot/issues/186*issuecomment-1688557224__;Iw!!OToaGQ!vmKT2NiBWyhp2lpc-INgzkgr2mRztztxIrXV_rYltOhfe1IbN5j3eip9n0E6YD_ypCI_KccWbYCeD5EYJax9ZJ9ALw$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AAYTY3S3LTA5MH324NOTFZ3XWTN6FANCNFSM5WL4WGYA__;!!OToaGQ!vmKT2NiBWyhp2lpc-INgzkgr2mRztztxIrXV_rYltOhfe1IbN5j3eip9n0E6YD_ypCI_KccWbYCeD5EYJayiaEk6BA$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
You can subset an SCE object the same way you would a matrix and it will keep all of the associated metadata. If you want to learn more, I would recommend the OSCA book: https://bioconductor.org/books/3.13/OSCA.intro/the-singlecellexperiment-class.html |
I'm applying slingshot to a reduced dimension plot created by PHATE and run into the following error.
The problem persists after remaking the seurat object.
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
Never encountered this error before when applying slingshot to PHATE embeddings and it only occurs for this specific dataset. Can supply a data frame of the embeddings and the cluster IDs if needed.
Running R version 4.1.2
igraph version 1.3.1
Slingshot version 2.2.1
Also the full versions of my attatched packages just in case
[1] igraph_1.3.1 gplots_3.1.3 scales_1.2.0 mclust_5.4.9 stringr_1.4.0
[6] reshape2_1.4.4 stringi_1.7.6 slingshot_2.2.1 TrajectoryUtils_1.2.0 princurve_2.1.6
[11] RColorBrewer_1.1-3 clustree_0.4.4 ggraph_2.0.5 scran_1.22.1 scuttle_1.4.0
[16] SingleCellExperiment_1.16.0 SummarizedExperiment_1.24.0 Biobase_2.54.0 GenomicRanges_1.46.1 GenomeInfoDb_1.30.1
[21] IRanges_2.28.0 S4Vectors_0.32.4 BiocGenerics_0.40.0 MatrixGenerics_1.6.0 matrixStats_0.62.0
[26] dtw_1.22-3 proxy_0.4-26 cowplot_1.1.1 ggpubr_0.4.0 rgl_0.108.10
[31] sp_1.4-7 SeuratObject_4.1.0 Seurat_4.1.1 dplyr_1.0.9 phateR_1.0.7
[36] Matrix_1.4-1 lattice_0.20-45 ggplot2_3.3.6 gridExtra_2.3 reticulate_1.25
The text was updated successfully, but these errors were encountered: