Skip to content
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

plot_dimred error #45

Open
lixin4306ren opened this issue Sep 9, 2019 · 5 comments
Open

plot_dimred error #45

lixin4306ren opened this issue Sep 9, 2019 · 5 comments

Comments

@lixin4306ren
Copy link

lixin4306ren commented Sep 9, 2019

It worked before and then got the error since I updated some packages. I seems there is no argument return_other_dimreds for function get_dimred in package dynwrap.

The command I used:

plot_dimred(model)

error:

Error in get_dimred(dataset = trajectory, dimred = dimred, expression_source = expression_source,  : 
  unused argument (return_other_dimreds = TRUE)
@rcannood
Copy link
Member

Hi @lixin4306ren,

I just merged the devel branch of dynwrap into master. Updating dynwrap should solve your problem.

devtools::install_github("dynverse/dynwrap")

Robrecht

@lixin4306ren
Copy link
Author

Thanks. I installed the latest dynwrap. However, sometimes I got this error when I set root milestone.

>plot_dimred(model)
>model <- model %>% add_root(root_milestone_id = "1")
> plot_dimred(model)
Coloring by milestone
Using milestone_percentages from trajectory
Error in approx(rel_edge_pos$percentage, rel_edge_pos[[cn]], df$percentage) : 
  need at least two non-NA values to interpolate

@bjreisman
Copy link

I'm also running into this error.

> model_rooted <- model_slingshot %>% add_root(root_milestone_id = 1)
> plot_dimred(model_rooted, color_cells = "pseudotime", expression_source = dataset)
Pseudotime not provided, will calculate pseudotime from root milestone

image

> model_rooted <- model_slingshot %>% add_root(root_milestone_id = 4)
> plot_dimred(model_rooted, color_cells = "pseudotime", expression_source = dataset, 
              plot_trajectory = F)
Pseudotime not provided, will calculate pseudotime from root milestone

image

Adding the plot_trajectory=F line allows it to plot, but it seems like only one of the branches is being considered in the pseudo-time calculations.

Without it, i run into the same error:

> plot_dimred(model_rooted, color_cells = "pseudotime", expression_source = dataset)
Pseudotime not provided, will calculate pseudotime from root milestone
Error in approx(rel_edge_pos$percentage, rel_edge_pos[[cn]], df$percentage) : 
  need at least two non-NA values to interpolate
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

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   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] dyno_0.1.1          dynwrap_1.1.4       dynplot_1.0.2.9000  dynmethods_1.0.5    dynfeature_1.0.0   
 [6] shiny_1.4.0         dynguidelines_1.0.0 uwot_0.1.4          Matrix_1.2-17       cytotidyr_0.0.1.100
[11] forcats_0.4.0       stringr_1.4.0       dplyr_0.8.3         purrr_0.3.3         readr_1.3.1        
[16] tidyr_1.0.0         tibble_2.1.3        ggplot2_3.2.1       tidyverse_1.2.1     sqldf_0.4-11       
[21] gsubfn_0.7          proto_1.0.0         CoGAPS_3.4.1        RSQLite_2.1.1      

loaded via a namespace (and not attached):
  [1] flowWorkspace_3.32.0        GGally_1.4.0                R.methodsS3_1.7.1          
  [4] GA_3.2                      acepack_1.4.1               bit64_0.9-7                
  [7] knitr_1.26                  irlba_2.3.3                 DelayedArray_0.10.0        
 [10] R.utils_2.9.0               data.table_1.12.6           rpart_4.1-15               
 [13] RCurl_1.95-4.12             generics_0.0.2              flowCore_1.50.0            
 [16] BiocGenerics_0.30.0         callr_3.3.2                 cowplot_1.0.0              
 [19] usethis_1.5.1               carrier_0.1.0               chron_2.3-54               
 [22] bit_1.1-14                  xml2_1.2.2                  lubridate_1.7.4            
 [25] httpuv_1.5.2                SummarizedExperiment_1.14.1 assertthat_0.2.1           
 [28] viridis_0.5.1               xfun_0.11                   hms_0.5.2                  
 [31] promises_1.1.0              fansi_0.4.0                 DEoptimR_1.0-8             
 [34] dbplyr_1.4.2                caTools_1.17.1.2            readxl_1.3.1               
 [37] Rgraphviz_2.28.0            igraph_1.2.4.1              DBI_1.0.0                  
 [40] htmlwidgets_1.5.1           reshape_0.8.8               stats4_3.6.1               
 [43] dyndimred_1.0.2             ellipsis_0.3.0              ks_1.11.5                  
 [46] ggcyto_1.12.0               backports_1.1.5             flowUtils_1.48.0           
 [49] RcppParallel_4.4.4          vctrs_0.2.0                 SingleCellExperiment_1.6.0 
 [52] Biobase_2.44.0              remotes_2.1.0               withr_2.1.2                
 [55] ggforce_0.3.1               robustbase_0.93-5           checkmate_1.9.4            
 [58] prettyunits_1.0.2           mclust_5.4.3                mnormt_1.5-5               
 [61] cluster_2.0.9               lazyeval_0.2.2              crayon_1.3.4               
 [64] babelwhale_1.0.1            hdf5r_1.3.0                 ellipse_0.4.1              
 [67] labeling_0.3                pkgconfig_2.0.3             tweenr_1.0.1               
 [70] GenomeInfoDb_1.20.0         vipor_0.4.5                 nlme_3.1-140               
 [73] pkgload_1.0.2               nnet_7.3-12                 devtools_2.2.1             
 [76] rlang_0.4.2                 lifecycle_0.1.0             CytobankAPI_1.3.0          
 [79] akima_0.6-2                 modelr_0.1.5                cellranger_1.1.0           
 [82] tcltk_3.6.1                 rprojroot_1.3-2             polyclip_1.10-0            
 [85] matrixStats_0.54.0          graph_1.62.0                flowClust_3.22.0           
 [88] Rhdf5lib_1.6.3              base64enc_0.1-3             processx_3.4.1             
 [91] viridisLite_0.3.0           bitops_1.0-6                R.oo_1.22.0                
 [94] KernSmooth_2.23-15          blob_1.2.0                  S4Vectors_0.22.1           
 [97] scales_1.1.0                memoise_1.1.0               magrittr_1.5               
[100] plyr_1.8.4                  hexbin_1.27.3               gplots_3.0.1.1             
[103] gdata_2.18.0                zlibbioc_1.30.0             openCyto_1.22.0            
[106] compiler_3.6.1              RColorBrewer_1.1-2          clue_0.3-57                
[109] rrcov_1.4-7                 cli_1.1.0                   XVector_0.24.0             
[112] patchwork_0.0.1             ncdfFlow_2.30.0             ps_1.3.0                   
[115] htmlTable_1.13.2            Formula_1.2-3               MASS_7.3-51.4              
[118] tidyselect_0.2.5            stringi_1.4.3               yaml_2.2.0                 
[121] latticeExtra_0.6-28         ggrepel_0.8.1               grid_3.6.1                 
[124] tools_3.6.1                 parallel_3.6.1              CytoML_1.10.0              
[127] rstudioapi_0.10             foreach_1.4.7               foreign_0.8-71             
[130] rje_1.10.10                 gridExtra_2.3               farver_2.0.1               
[133] ggraph_2.0.0                proxyC_0.1.5                digest_0.6.23              
[136] dynparam_1.0.0              Rcpp_1.0.3                  GenomicRanges_1.36.1       
[139] broom_0.5.2                 later_1.0.0                 shinyWidgets_0.4.9         
[142] fda_2.4.8                   httr_1.4.1                  IDPmisc_1.1.19             
[145] flowStats_3.42.0            colorspace_1.4-1            ranger_0.11.2              
[148] rvest_0.3.4                 XML_3.98-1.19               fs_1.3.1                   
[151] IRanges_2.18.3              splines_3.6.1               RBGL_1.60.0                
[154] graphlayouts_0.5.0          sp_1.3-1                    sessioninfo_1.1.1          
[157] xtable_1.8-4                jsonlite_1.6                tidygraph_1.1.2            
[160] corpcor_1.6.9               zeallot_0.1.0               testthat_2.3.0             
[163] R6_2.4.1                    RUnit_0.4.32                Hmisc_4.3-0                
[166] pillar_1.4.2                htmltools_0.4.0             mime_0.7                   
[169] glue_1.3.1                  fastmap_1.0.1               BiocParallel_1.18.1        
[172] codetools_0.2-16            utf8_1.1.4                  pkgbuild_1.0.6             
[175] pcaPP_1.9-73                mvtnorm_1.0-10              lattice_0.20-38            
[178] flowViz_1.48.0              curl_4.2                    gtools_3.8.1               
[181] shinyjs_1.0                 survival_3.1-7              desc_1.2.0                 
[184] dynutils_1.0.4              munsell_0.5.0               rhdf5_2.28.1               
[187] GenomeInfoDbData_1.2.1      iterators_1.0.12            haven_2.1.0                
[190] reshape2_1.4.3              gtable_0.3.0     

@Atvar2
Copy link

Atvar2 commented Jun 20, 2023

We test th examles under Rsudio as the following command, howerver, it reports errors, we can't find the reason, plot_dimred(example_bifurcating)

errors:
Coloring by milestone
Using milestone_percentages from trajectory
Loading required namespace: RColorBrewer
Error in ggforce::geom_link2():
! Problem while converting geom to grob.
ℹ Error occurred in the 7th layer.
Caused by error in [.data.frame:
! undefined columns selected
Run rlang::last_trace() to see where the error occurred.

@Joanexee
Copy link

Got the same undefined columns selected error with example data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants