jw156605 / SLICER

SLICER algorithm for inferring cell trajectories. See details in Welch et al., Genome Biology 2016: http://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0975-3
12 stars 6 forks source link

ERROR in assign_branches #9

Closed semmrich closed 10 months ago

semmrich commented 5 years ago

Hi, I am working with a random downsampled dataset to ~1600 cells x ~10k genes, which gave me ONE TIME when I tried SLICER a very precise pseudotiming for all the clusters I calculated with Seurat v3. However, now I try to reproduce it with the SAME original dataset but another RANDOM downsampling to the same ~1600 cells x ~10k genes SLICER dataset size, and I get almost ALWAYS this error:

Error in if (mean_dist < min_dist) { : 
  missing value where TRUE/FALSE needed
Calls: assign_branches ... assign_branches -> assign_branches -> assign_branches

But in very few cases I get another error thrown:

Error in vertex_probs[i, ] : subscript out of bounds
Calls: assign_branches ... assign_branches -> assign_branches -> entropy_i -> which

ALWAYS at the same code line:

branches <- assign_branches(slicer_traj_graph, start)

This is very perplexing, the error log is inexpressive and I tried multiple permutations of k in

slicer_traj_lle <- lle(t(PT100.sce.counts[slicer_genes,]), m = 2, k)$Y

combined with either calculated

slicer_k <- select_k(t(PT100.sce.counts[slicer_genes,]), kmin = 1, kmax=100, by=5)

or manually set

slicer_k <- 1
slicer_k <- 10

etc And if I use

slicer_traj_lle <- lle(t(PT100.sce.counts[slicer_genes,]), m = 2, slicer_k)$Y

I got the error:

Error in 1:num_branches : NA/NaN argument
Calls: assign_branches ... assign_branches -> assign_branches -> assign_branches

The example under https://scrnaseq-course.cog.sanger.ac.uk/website/biological-analysis.html#slicer works fine, why is my data not reproducible???

Any help is greatly appreciated, Stephan

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
 [1] dyno_0.1.1                  dynwrap_1.1.4.9000          dynplot_1.0.2.9000          dynmethods_1.0.5           
 [5] dynguidelines_1.0.0         dynfeature_1.0.0.9000       corrplot_0.84               ggbeeswarm_0.6.0           
 [9] ggthemes_4.2.0              ouija_0.99.0                SLICER_0.2.0                lle_1.1                    
[13] snowfall_1.84-6.1           snow_0.4-3                  MASS_7.3-51.4               scatterplot3d_0.3-41       
[17] destiny_2.14.0              monocle_2.13.0              DDRTree_0.1.5               VGAM_1.1-1                 
[21] M3Drop_1.10.0               numDeriv_2016.8-1.1         TSCAN_1.22.0                igraph_1.2.4.1             
[25] irlba_2.3.3                 DropletUtils_1.4.3          scran_1.12.1                scater_1.12.2              
[29] futile.matrix_1.2.7         Matrix_1.2-18               gridExtra_2.3               gtable_0.3.0               
[33] rowr_1.1.3                  fgsea_1.10.0                Rcpp_1.0.2                  VennDiagram_1.6.20         
[37] futile.logger_1.4.3         data.table_1.12.2           GSVA_1.32.0                 SingleCellExperiment_1.6.0 
[41] SummarizedExperiment_1.14.1 DelayedArray_0.10.0         BiocParallel_1.18.0         matrixStats_0.54.0         
[45] Biobase_2.44.0              GenomicRanges_1.36.0        GenomeInfoDb_1.20.0         IRanges_2.18.1             
[49] S4Vectors_0.22.0            BiocGenerics_0.30.0         BBmisc_1.11                 tibble_2.1.3               
[53] readxl_1.3.1                ggplot2_3.2.1               gplots_3.0.3                dplyr_0.8.3                
[57] Seurat_3.0.2               

loaded via a namespace (and not attached):
  [1] rsvd_1.0.2               vcd_1.4-4                Hmisc_4.2-0              ica_1.0-2                corpcor_1.6.9           
  [6] ps_1.3.0                 class_7.3-15             foreach_1.5.1            lmtest_0.9-37            crayon_1.3.4            
 [11] laeken_0.5.0             nlme_3.1-141             backports_1.1.4          qlcMatrix_0.9.7          GA_3.2                  
 [16] rlang_0.4.0              XVector_0.24.0           ROCR_1.0-7               callr_3.3.1              limma_3.40.6            
 [21] smoother_1.1             rjson_0.2.20             dyndimred_1.0.2.9000     bit64_0.9-8              loo_2.1.0               
 [26] glue_1.3.1               pheatmap_1.0.12          splancs_2.01-40          sctransform_0.2.0        processx_3.4.1          
 [31] rstan_2.19.2             vipor_0.4.5              AnnotationDbi_1.46.0     dynutils_1.0.4.9000      haven_2.1.1             
 [36] tidyselect_0.2.5         rio_0.5.16               fitdistrplus_1.0-14      XML_3.98-1.20            tidyr_0.8.3             
 [41] zoo_1.8-6                rje_1.9                  xtable_1.8-4             magrittr_1.5             bibtex_0.4.2            
 [46] cli_1.1.0                Rdpack_0.11-0            zlibbioc_1.30.0          rstudioapi_0.10          sp_1.3-1                
 [51] rpart_4.1-15             fastmatch_1.1-1          lambda.tools_1.0.9       lambda.r_1.2.3           RcppEigen_0.3.3.5.0     
 [56] shiny_1.3.2              BiocSingular_1.0.0       xfun_0.8                 inline_0.3.15            clue_0.3-57             
 [61] pkgbuild_1.0.4           cluster_2.1.0            caTools_1.17.1.2         tidygraph_1.1.2          sgeostat_1.0-27         
 [66] ggrepel_0.8.1            ape_5.3                  listenv_0.7.0            png_0.1-7                future_1.14.0           
 [71] zeallot_0.1.0            withr_2.1.2              ggforce_0.3.0            bitops_1.0-6             slam_0.1-45             
 [76] ranger_0.11.2            plyr_1.8.4               cellranger_1.1.0         GSEABase_1.46.0          sparsesvd_0.2           
 [81] coda_0.19-3              e1071_1.7-2              dqrng_0.2.1              pillar_1.4.2             RcppParallel_4.4.3      
 [86] GlobalOptions_0.1.0      reldist_1.6-6            TTR_0.23-4               GetoptLong_0.1.7         tripack_1.3-8           
 [91] DelayedMatrixStats_1.6.0 xts_0.11-2               vctrs_0.2.0              metap_1.1                tools_3.6.1             
 [96] foreign_0.8-72           beeswarm_0.2.3           tweenr_1.0.1             munsell_0.5.0            proxy_0.4-23            
[101] HSMMSingleCell_1.4.0     compiler_3.6.1           abind_1.4-7              httpuv_1.5.1             babelwhale_1.0.0.9000   
[106] sessioninfo_1.1.1        plotly_4.9.0             GenomeInfoDbData_1.2.1   edgeR_3.26.6             lattice_0.20-38         
[111] deldir_0.1-23            later_0.8.0              jsonlite_1.6             scales_1.0.0             docopt_0.6.1            
[116] graph_1.62.0             pbapply_1.4-1            carData_3.0-2            lazyeval_0.2.2           promises_1.0.1          
[121] spatstat_1.60-1          car_3.0-4                latticeExtra_0.6-28      R.utils_2.9.0            goftest_1.1-1           
[126] spatstat.utils_1.13-0    reticulate_1.13          checkmate_1.9.4          openxlsx_4.1.0.1         cowplot_1.0.0           
[131] statmod_1.4.32           Rtsne_0.15               forcats_0.4.0            HDF5Array_1.12.2         proxyC_0.1.5            
[136] yaml_2.2.0               carrier_0.1.0            survival_2.44-1.1        htmltools_0.3.6          memoise_1.1.0           
[141] locfit_1.5-9.1           viridisLite_0.3.0        digest_0.6.20            assertthat_0.2.1         mime_0.7.1              
[146] densityClust_0.3         futile.options_1.0.1     npsurv_0.4-0             dynparam_1.0.0.9000      RSQLite_2.1.2           
[151] future.apply_1.3.0       lsei_1.2-0               remotes_2.1.0            blob_1.2.0               R.oo_1.22.0             
[156] fastICA_1.2-2            shinythemes_1.1.2        Formula_1.2-3            Rhdf5lib_1.6.0           RCurl_1.95-4.12         
[161] hms_0.5.0                rhdf5_2.28.0             colorspace_1.4-1         base64enc_0.1-4          SDMTools_1.1-221.1      
[166] shape_1.4.4              nnet_7.3-12              mclust_5.4.5             RANN_2.6.1               circlize_0.4.6          
[171] VIM_4.8.0                R6_2.4.0                 ggridges_0.5.1           acepack_1.4.1            formatR_1.7.1           
[176] StanHeaders_2.18.1-10    zip_2.0.3                curl_4.0                 gdata_2.18.0             testthat_2.2.1          
[181] robustbase_0.93-6        RColorBrewer_1.1-2       iterators_1.0.12         MCMCglmm_2.29            alphahull_2.2           
[186] stringr_1.4.0            htmlwidgets_1.3          polyclip_1.10-0          purrr_0.3.2              RMTstat_0.3             
[191] ComplexHeatmap_2.0.0     mgcv_1.8-28              globals_0.12.4           patchwork_0.0.1          tensorA_0.36.1          
[196] htmlTable_1.13.1         codetools_0.2-16         FNN_1.1.3                prettyunits_1.0.2        gtools_3.8.1            
[201] R.methodsS3_1.7.1        tsne_0.1-3               DBI_1.0.0                dynamicTreeCut_1.63-1    tensor_1.5              
[206] httr_1.4.1               KernSmooth_2.23-15       stringi_1.4.3            farver_1.1.0             reshape2_1.4.3          
[211] cubature_2.0.3           annotate_1.62.0          viridis_0.5.1            combinat_0.0-8           bbmle_1.0.20            
[216] boot_1.3-23              BiocNeighbors_1.2.0      readr_1.3.1              geneplotter_1.62.0       DEoptimR_1.0-8          
[221] bit_1.1-14               spatstat.data_1.4-0      ggraph_1.0.2             pkgconfig_2.0.2          gbRd_0.4-11     
handesome commented 10 months ago

same error!did you solve the problem? Thanks!

galicae commented 10 months ago

I don't think this software is maintained. You might want to consider other pseudo-time tools.

handesome commented 10 months ago

I don't think this software is maintained. You might want to consider other pseudo-time tools.

Hi! Thank you for the quick reply!that‘s so bad.could you recommend some other pseudo-time tools? Thanks again!

galicae commented 10 months ago

Generally when you don't know where to start, it is recommended to look for a benchmark paper. New papers will reference older tools and benchmark against them, as for example here. There also exists a tutorial, if you care to look. Please make sure that your use case is an appropriate application of the pseudotime concept.

semmrich commented 10 months ago

I've found dynverse to be very flexible and rich in vizualization options, it tests multiple trajectory algorithms.