dynverse / dyno

Inferring, interpreting and visualising trajectories using a streamlined set of packages 🦕
https://dynverse.github.io/dyno
Other
163 stars 32 forks source link

Error when using plot_dimred #113

Closed CromitDolores0808 closed 2 years ago

CromitDolores0808 commented 3 years ago

Here is my code: plot_dimred( model ) The model was built successfully. Here is the error:

Coloring by milestone Using milestone_percentages from trajectory Error: Must supply a symbol or a string as argument Run rlang::last_error() to see where the error occurred.

rlang::last_error() <error/rlang_error> Must supply a symbol or a string as argument Backtrace:

  1. patchwork::wrap_plots(...)
  2. tidyr:::gather.data.frame(...)
  3. tidyr:::ensym2(key) Run rlang::last_trace() to see the full context. rlang::last_trace() <error/rlang_error> Must supply a symbol or a string as argument Backtrace: █
  4. ├─patchwork::wrap_plots(...)
  5. │ └─patchwork:::is_valid_plot(..1)
  6. │ └─ggplot2::is.ggplot(x)
  7. ├─dynplot::plot_dimred(model)
  8. │ └─dynplot:::project_waypoints_coloured(...)
  9. │ └─%>%(...)
  10. ├─dplyr::summarise(...)
  11. ├─dplyr::group_by(., .data$from, .data$to, .data$comp_name)
  12. ├─tidyr::gather(., .data$comp_name, .data$comp_value, startswith("comp"))
  13. └─tidyr:::gather.data.frame(...)
  14. ├─rlang::as_string(ensym2(key))
  15. │ └─rlang::is_string(x)
  16. └─tidyr:::ensym2(key)

R version 3.6.1

Many thanks!

TJonCooper commented 2 years ago

Please update to the latest, developmental version of dyno or dynplot - and this error should be fixed AFAIK:

devtools::install_github("dynverse/dynplot@devel")

CromitDolores0808 commented 2 years ago

Please update to the latest, developmental version of dyno or dynplot - and this error should be fixed AFAIK:

devtools::install_github("dynverse/dynplot@devel")

Thanks! But here is another error after reinstalling the dynplot@devel and dyno@devel :

plot_dimred(model) Coloring by milestone Using milestone_percentages from trajectory Error: Problem with summarise() input color. x lazy-load database '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dynplot/R/dynplot.rdb' is corrupt ℹ Input color is mix_colors(.data$milestone_id, .data$percentage, milestone_colors). ℹ The error occurred in group 1: cell_id = "P1_P_AACAAAGTCCATAAGC". Run rlang::last_error() to see where the error occurred. In addition: Warning messages: 1: In .Call(dplyr_mask_eval_all_summarise, quo, private) : restarting interrupted promise evaluation 2: In mask$eval_all_summarise(quo) : internal error -3 in R_decompress1

rcannood commented 2 years ago

Thanks @TJonCooper bringing this up. In the meantime, this version of dynplot has been published to CRAN, so simply updating dynplot should also do the trick.

@CromitDolores0808 Could you try restarting R before updating dynplot?

CromitDolores0808 commented 2 years ago

Thanks @TJonCooper bringing this up. In the meantime, this version of dynplot has been published to CRAN, so simply updating dynplot should also do the trick.

@CromitDolores0808 Could you try restarting R before updating dynplot?

Many Thanks! It works.

wfma commented 2 years ago

I just had the same issues running slingshot. The model run took several hours and plot_dimred produced the exact same error code.

I just restarted R and updated to developmental version via devtools::install_github("dynverse/dynplot@devel")

and the error resolved.