kstreet13 / slingshot

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

Error when running slingshot on Rstudio 4.1.0 #162

Closed HousLi closed 2 years ago

HousLi commented 2 years ago

Hello,

I was trying to run slingshot functions on Rstudio 4.1.0, but I got an error when running the following commands,

lnes@lineages Error: no slot of name "lineages" for this object of class "PseudotimeOrdering"

Below is my session info,

sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux

Matrix products: default BLAS: /usr/lib64/libblas.so.3.4.2 LAPACK: /usr/lib64/liblapack.so.3.4.2

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] splines parallel stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] scRepertoire_1.3.2 corrplot_0.90 ggthemes_4.2.4
[4] ggbeeswarm_0.6.0 Polychrome_1.3.1 scater_1.20.1
[7] ggplot2_3.3.5 scuttle_1.2.1 gam_1.20
[10] foreach_1.5.1 slingshot_2.1.1 TrajectoryUtils_1.0.0
[13] princurve_2.1.6 SingleCellExperiment_1.14.1 SummarizedExperiment_1.22.0 [16] Biobase_2.52.0 GenomicRanges_1.44.0 GenomeInfoDb_1.28.4
[19] IRanges_2.26.0 S4Vectors_0.30.2 BiocGenerics_0.38.0
[22] MatrixGenerics_1.4.3 matrixStats_0.61.0 SeuratObject_4.0.2
[25] Seurat_4.0.4

loaded via a namespace (and not attached): [1] VGAM_1.1-5 plyr_1.8.6 igraph_1.2.6
[4] lazyeval_0.2.2 powerTCR_1.12.0 BiocParallel_1.26.2
[7] listenv_0.8.0 scattermore_0.7 digest_0.6.28
[10] htmltools_0.5.2 viridis_0.6.1 ggalluvial_0.12.3
[13] fansi_0.5.0 truncdist_1.0-2 magrittr_2.0.1
[16] ScaledMatrix_1.0.0 doParallel_1.0.16 tensor_1.5
[19] cluster_2.1.2 ROCR_1.0-11 remotes_2.4.1
[22] globals_0.14.0 spatstat.sparse_2.0-0 colorspace_2.0-2
[25] ggrepel_0.9.1 dplyr_1.0.7 crayon_1.4.1
[28] RCurl_1.98-1.5 jsonlite_1.7.2 spatstat.data_2.1-0
[31] survival_3.2-13 zoo_1.8-9 iterators_1.0.13
[34] glue_1.4.2 polyclip_1.10-0 gtable_0.3.0
[37] zlibbioc_1.38.0 XVector_0.32.0 leiden_0.3.9
[40] DelayedArray_0.18.0 evd_2.3-3 BiocSingular_1.8.1
[43] future.apply_1.8.1 SparseM_1.81 abind_1.4-5
[46] scales_1.1.1 DBI_1.1.1 miniUI_0.1.1.1
[49] Rcpp_1.0.7 viridisLite_0.4.0 xtable_1.8-4
[52] reticulate_1.22 spatstat.core_2.3-0 rsvd_1.0.5
[55] htmlwidgets_1.5.4 httr_1.4.2 RColorBrewer_1.1-2
[58] ellipsis_0.3.2 ica_1.0-2 pkgconfig_2.0.3
[61] uwot_0.1.10 deldir_1.0-5 utf8_1.2.2
[64] tidyselect_1.1.1 rlang_0.4.11 reshape2_1.4.4
[67] later_1.3.0 munsell_0.5.0 tools_4.1.0
[70] generics_0.1.0 ggridges_0.5.3 stringr_1.4.0
[73] fastmap_1.1.0 goftest_1.2-3 evmix_2.12
[76] fitdistrplus_1.1-6 purrr_0.3.4 RANN_2.6.1
[79] pbapply_1.5-0 future_1.22.1 nlme_3.1-153
[82] sparseMatrixStats_1.4.2 mime_0.12 compiler_4.1.0
[85] beeswarm_0.4.0 plotly_4.10.0 png_0.1-7
[88] spatstat.utils_2.2-0 tibble_3.1.5 gsl_2.1-7
[91] stringi_1.7.5 cubature_2.0.4.2 lattice_0.20-45
[94] Matrix_1.3-4 permute_0.9-5 vegan_2.5-7
[97] vctrs_0.3.8 stringdist_0.9.8 pillar_1.6.3
[100] lifecycle_1.0.1 spatstat.geom_2.2-2 lmtest_0.9-38
[103] RcppAnnoy_0.0.19 BiocNeighbors_1.10.0 data.table_1.14.2
[106] cowplot_1.1.1 bitops_1.0-7 irlba_2.3.3
[109] httpuv_1.6.3 patchwork_1.1.1 R6_2.5.1
[112] promises_1.2.0.1 KernSmooth_2.23-20 gridExtra_2.3
[115] vipor_0.4.5 parallelly_1.28.1 codetools_0.2-18
[118] MASS_7.3-54 assertthat_0.2.1 withr_2.4.2
[121] sctransform_0.3.2 GenomeInfoDbData_1.2.6 mgcv_1.8-36
[124] grid_4.1.0 rpart_4.1-15 beachmat_2.8.1
[127] tidyr_1.1.4 DelayedMatrixStats_1.14.3 Rtsne_0.15
[130] scatterplot3d_0.3-41 shiny_1.7.1

Is this due to a compatibility issue? Can you help me resolve this problem?

Thanks a lot ! Li

kstreet13 commented 2 years ago

Hi @HousLi ,

Thanks for the question! This is expected behavior with newer versions of the package, as the default output format has changed from a SlingshotDataSet to a PseudotimeOrdering (which does not contain a lineages slot). In general, I would advise against using the @ operator with either of these object types and instead use the more flexible accessor functions. In this case, slingLineages(lnes) should work regardless of what type of object it is (including SingleCellExperiment objects).

Best, Kelly

HousLi commented 2 years ago

Hi @HousLi ,

Thanks for the question! This is expected behavior with newer versions of the package, as the default output format has changed from a SlingshotDataSet to a PseudotimeOrdering (which does not contain a lineages slot). In general, I would advise against using the @ operator with either of these object types and instead use the more flexible accessor functions. In this case, slingLineages(lnes) should work regardless of what type of object it is (including SingleCellExperiment objects).

Best, Kelly

Thank you Kelly, I will give it a try.

Best, Li

HousLi commented 2 years ago

It is now working! Thanks for your help!

Best, Li