slingshot
slingshot copied to clipboard
Warning messages useNames = NA is deprecated when running the slingshot
Hi Kelly,
Thank you for developing this amazing package. I received 22 warning messages (which is the same as number of clusters in the sce object) when running slingshot using the following code:
slingshot(ddrp_sce, reducedDim = "UMAP", clusterLabels = ddrp_sce$SCT_snn_res.0.9, start.clus = 1, extend = "n", reweight = FALSE, reassign = FALSE)
Warning messages: 1: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 2: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. ... 22: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE.
My data structure:
class: SingleCellExperiment dim: 28058 37295 metadata(0): assays(2): counts logcounts rownames(28058): AL627309.1 AL627309.5 ... CSAG3 FAM224B rowData names(0): colnames(37295): GAAGAATTCATAGGCT-1_19 CAGATCACATATAGCC-1_3 ... GTAATCGCAGACTCTA-1_8 GGAACCCGTCAGTCGC-1_14 colData names(42): orig.ident nCount_RNA ... slingPseudotime_4 slingPseudotime_5 reducedDimNames(3): PCA HARMONY UMAP mainExpName: RNA altExpNames(0):
My sessioninfo:
R version 4.1.3 (2022-03-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.6 LTS
Matrix products: default BLAS: /software/spackages_prod/apps/linux-ubuntu20.04-zen2/gcc-10.3.0/r-4.1.3-uef5o4nye3h4yc2yt4s2kl2vmi3vuvzm/rlib/R/lib/libRblas.so LAPACK: /software/spackages_prod/apps/linux-ubuntu20.04-zen2/gcc-10.3.0/r-4.1.3-uef5o4nye3h4yc2yt4s2kl2vmi3vuvzm/rlib/R/lib/libRlapack.so
locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8
[6] LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base
other attached packages: [1] Seurat_4.3.0 SeuratObject_4.1.3 sp_1.6-1 tidyr_1.3.0 cowplot_1.1.1
[6] pheatmap_1.0.12 RColorBrewer_1.1-3 scater_1.22.0 ggplot2_3.4.2 scuttle_1.4.0
[11] condiments_1.5.0 slingshot_2.7.0 TrajectoryUtils_1.2.0 princurve_2.1.6 SingleCellExperiment_1.16.0 [16] SummarizedExperiment_1.24.0 Biobase_2.54.0 GenomicRanges_1.46.1 GenomeInfoDb_1.30.1 IRanges_2.28.0
[21] S4Vectors_0.32.4 BiocGenerics_0.40.0 MatrixGenerics_1.6.0 matrixStats_1.0.0 tradeSeq_1.8.0
[26] dplyr_1.1.2 here_1.0.1
Is this caused by the internal algorithms slingshot is using or my data? Also, which do you suggest to use for the reduced dimensions, HARMONY or UMAP? Many thanks.
Same issue here...
Hi @xuesen07 and @VivianQM,
Thank you for bringing this to my attention! This turned out to be a pretty deep rabbit hole, but I think you can safely ignore these warnings.
Apparently the matrixStats
package has recently changed the way it handles names, which is forcing packages like matrixGenerics
and DelayedMatrixStats
(a dependency of slingshot
via TrajectoryUtils
) to update. I am guessing that they will resolve these issues soon, based on these related issues:
https://github.com/PeteHaitch/DelayedMatrixStats/issues/91
https://github.com/Bioconductor/MatrixGenerics/issues/31
Importantly, these issues don't seem to affect the actual calculations, so slingshot
should still be functioning as intended, but please do let me know if you notice any errors or inconsistencies.
Best, Kelly
Hi,
Exact same error. It is not a warning anymore. Any update on it?
Thank you, Aastha
@kstreet13 That's good to hear. Thanks.
@apal6 Maybe you can check the version of packages you're using. If they're the same as mine, I assume you will receive the same warn message.
Hi,
Thank you for quick response. I have checked the version of slingshot and it is 2.7.0. Still getting the same error. Not sure what's failing.
sds <- slingshot(sub_obj.sce, clusterLabels = clusterLabels, start.clus = 'CD8-Naive', reducedDim =rd,useNames = TRUE ) #Calcualting the trajectory Error: (converted from warning) useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE.
`session info:
[25] patchwork_1.1.2 dplyr_1.1.2 SeuratObject_4.1.3 Seurat_4.3.0
[29] BiocManager_1.30.21 slingshot_2.7.0 TrajectoryUtils_1.6.0 SingleCellExperiment_1.20.1
[33] SummarizedExperiment_1.28.0 Biobase_2.58.0 GenomicRanges_1.50.2 GenomeInfoDb_1.34.9
[37] IRanges_2.32.0 S4Vectors_0.36.2 BiocGenerics_0.44.0 MatrixGenerics_1.10.0 `
Thank you, Aastha
@apal6 What version of R are you using? Looks like 4.1.3 and 4.2.2 are only giving warnings, but maybe 4.3 is different.
Hi,
I just updated my R and now the error is:
sds <- slingshot(Embeddings(tcell_combined_filtered, "umap"), clusterLabels = tcell_combined_filtered$seurat_clusters, start.clus = 4, stretch = 0) Error in .slingParams(pto) <- c(slingParams(pto), shrink = shrink, extend = extend, : lazy-load database '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/slingshot/R/slingshot.rdb' is corrupt In addition: Warning messages: 1: In get(var, frame, inherits = FALSE) : internal error -3 in R_decompress1 2: In .slingParams(pto) <- c(slingParams(pto), shrink = shrink, extend = extend, : restarting interrupted promise evaluation 3: In .slingParams(pto) <- c(slingParams(pto), shrink = shrink, extend = extend, : internal error -3 in R_decompress1
What do you suspect now?
Thank you, Aastha
Yikes, not sure what that might be. Did you re-install slingshot
after updating R? If not, that might be the problem. Otherwise, I'm not sure, so could you share the output of sessionInfo()
?
Yes, I did re-install. Will try to remove and install again.
Hi there, I encounter the same error.. can you help me?
sce.sling2 <- slingshot(HealthyCortexssce, clusterLabels = ClLa, reducedDim='PCA', useNames=T) Error in igraph::shortest_paths(tree, from = l, to = ends, mode = "out", : At core/paths/dijkstra.c:364 : Weight vector must not contain NaN values, Invalid value In addition: Warning messages: 1: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 2: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 3: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 4: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 5: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 6: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE.
sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 22.04.2 LTS
Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 LC_COLLATE=C.UTF-8
[5] LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 LC_PAPER=C.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] parallel stats4 grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] slingshot_2.2.1 princurve_2.1.6 TSCAN_1.32.0
[4] TrajectoryUtils_1.2.0 scater_1.22.0 scuttle_1.4.0
[7] shiny_1.7.4.1 doParallel_1.0.17 iterators_1.0.14
[10] foreach_1.5.2 NMF_0.26 cluster_2.1.2
[13] rngtools_1.5.2 registry_0.5-1 org.Hs.eg.db_3.14.0
[16] biomaRt_2.50.3 harmony_0.1.1 Rcpp_1.0.11
[19] scDblFinder_1.15.1 enrichR_3.2 lubridate_1.9.2
[22] stringr_1.5.0 dplyr_1.1.2 purrr_1.0.1
Thank you in advance! Best, Victoria
Has this problem been solved? We ran into the same issue as mentioned above by Victoria (vfincke). Thank you in advance! Best, Anne
Hi @vfincke and @AnneKathrinMerbach,
Thanks for the reports! However, I should point out that the actual error message here is just the first part:
Error in igraph::shortest_paths(tree, from = l, to = ends, mode = "out", : At core/paths/dijkstra.c:364 : Weight vector must not contain NaN values, Invalid value
This error has been seen a few times before (https://github.com/kstreet13/slingshot/issues/186) and is usually a result of having clusters that are too small (0-2 cells).
The additional messages about useNames
are just warnings and should be safe to ignore. For what it's worth, those seem to have been resolved and should go away if you re-install the relevant packages.
Best, Kelly
This may help . https://github.com/LTLA/SingleR/issues/256#issuecomment-1854641463