You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plot_dimred() error: Must supply a symbol or a string as argument #54
I have just updated the packages dynmethods, dynplot,dyno with devtools::install_github("dynverse/dynplot")
Moreover it seems that figures have a different appearance, less resolute.
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
I have the same issue. But no matter how I tried following your suggestions above, I cannot get the program run. The followings are my code, and could you please take a look?
I have tried with devtools::install_github("dynverse/dynplot@devel")
Thanks for your time
dat <- readRDS("mySeuratProject")
dataset <- wrap_expression(
counts = t(dat@assays$RNA@counts),
expression = t(dat@assays$RNA@data)
) %>%
add_grouping(dat$finClu)
guidelines <- guidelines_shiny(dataset)
methods_selected <- guidelines$methods_selected
model <- infer_trajectory(dataset, methods_selected[1])
model <- infer_trajectory(dataset, dynmethods::ti_slingshot())
plot_dimred(
model,
expression_source = dataset$expression,
grouping = dataset$grouping
)
# The outcome for both methods above have the same error:
Coloring by grouping
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. dynplot::plot_dimred(...)
7. tidyr:::gather.data.frame(...)
10. 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:
x
1. +-dynplot::plot_dimred(...)
2. | \-dynplot:::project_waypoints_coloured(...)
3. | \-`%>%`(...)
4. +-dplyr::summarise(...)
5. +-dplyr::group_by(., .data$from, .data$to, .data$comp_name)
6. +-tidyr::gather(., .data$comp_name, .data$comp_value, starts_with("comp_"))
7. \-tidyr:::gather.data.frame(...)
8. +-rlang::as_string(ensym2(key))
9. | \-rlang::is_string(x)
10. \-tidyr:::ensym2(key)
> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
Hi @rcannood. Thank you for such useful tools. Unfortunately, I have the same issue as @NaijIuc. I also installed the devtools::install_github("dynverse/dynplot@devel") and followed the example you have online. Thank you
Hi @rcannood. Thank you for such useful tools. Unfortunately, I have the same issue as @NaijIuc. I also installed the devtools::install_github("dynverse/dynplot@devel") and followed the example you have online. Thank you
You can try to change R version like 3.6, 4.05, 4.10 etc.. I have no clue why I finally can let it run, but I am highly doubting that is relevant to R version.
Hi @rcannood. Thank you for such useful tools. Unfortunately, I have the same issue as @NaijIuc. I also installed the devtools::install_github("dynverse/dynplot@devel") and followed the example you have online. Thank you
You can try to change R version like 3.6, 4.05, 4.10 etc.. I have no clue why I finally can let it run, but I am highly doubting that is relevant to R version.
I was getting the same error with my data and even with the example from quick-start. Updated to devel version of dynplot and still had the error. I restarted my R session and tried again and it worked. So those getting this error, try again in a clean environment. Probably a conflicting function somewhere.
You can run the short reproducible example below to be sure that it works and it's not your data or the version of dynplot.
library(dyno)
#> Loading required package: dynfeature#> Loading required package: dynguidelines#> Loading required package: dynmethods#> Loading required package: dynplot#> Loading required package: dynwrap
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
data("fibroblast_reprogramming_treutlein")
dataset<- wrap_expression(
counts=fibroblast_reprogramming_treutlein$counts,
expression=fibroblast_reprogramming_treutlein$expression
)
model<- infer_trajectory(dataset, "slingshot")
#> Loading required namespace: hdf5rmodel<-model %>% add_dimred(dyndimred::dimred_mds, expression_source=dataset$expression)
plot_dimred(
model,
expression_source=dataset$expression,
grouping=fibroblast_reprogramming_treutlein$grouping
)
#> Coloring by grouping#> Loading required namespace: RColorBrewer
Activity
BUG FIX `project_waypoints()`: Fix refactoring issue "Must supply a s…
rcannood commentedon Jun 24, 2021
Hi Paweł!
Thanks for reporting this issue. It seems a small bug snuck into the code during the last release.
By installing the dynplot@devel branch, you should now be able to run the following code:
Can you run
devtools::install_github("dynverse/dynplot@devel")to confirm that it has been solved?Kind regards,
Robrecht
pawelqs commentedon Jun 25, 2021
Yes, it works now. Thank you!
A am a little bit worried now about the trajectory detected in the data. Why is it so short?
Bio-data-tricks commentedon Jun 27, 2021
Hi Pawel125,
I have the same issue with my data. The same code works well two weeks ago.

Nicolas
rcannood commentedon Jun 27, 2021
Bio-data-tricks commentedon Jun 27, 2021
Hi Robrecht,
Here is the code,
I have just updated the packages dynmethods, dynplot,dyno with devtools::install_github("dynverse/dynplot")
Moreover it seems that figures have a different appearance, less resolute.
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RColorBrewer_1.1-2 RCurl_1.98-1.3 knitr_1.33
[4] viridis_0.6.1 viridisLite_0.4.0 arrow_4.0.1
[7] feather_0.3.5 ggthemes_4.2.4 plot3D_1.4
[10] reshape_0.8.8 Matrix_1.3-4 svglite_2.0.0
[13] readxl_1.3.1 dyno_0.1.2 dynwrap_1.2.2
[16] dynplot_1.1.1 dynmethods_1.0.5.9000 dynguidelines_1.0.1
[19] dynfeature_1.0.0 forcats_0.5.1 stringr_1.4.0
[22] dplyr_1.0.6 purrr_0.3.4 readr_1.4.0
[25] tidyr_1.1.3 tibble_3.1.2 ggplot2_3.3.5
[28] tidyverse_1.3.1
loaded via a namespace (and not attached):
[1] uuid_0.1-4 backports_1.2.1 dyndimred_1.0.4
[4] systemfonts_1.0.2 babelwhale_1.0.3 plyr_1.8.6
[7] igraph_1.2.6 repr_1.1.3 proxyC_0.2.0
[10] usethis_2.0.1 digest_0.6.27 foreach_1.5.1
[13] htmltools_0.5.1.1 fansi_0.5.0 magrittr_2.0.1
[16] memoise_2.0.0 carrier_0.1.0 remotes_2.4.0
[19] graphlayouts_0.7.1 modelr_0.1.8 RcppParallel_5.1.4
[22] dynutils_1.0.6 prettyunits_1.1.1 colorspace_2.0-1
[25] rvest_1.0.0 ggrepel_0.9.1 haven_2.4.1
[28] xfun_0.24 tcltk_4.1.0 callr_3.7.0
[31] crayon_1.4.1 jsonlite_1.7.2 iterators_1.0.13
[34] glue_1.4.2 polyclip_1.10-0 gtable_0.3.0
[37] pkgbuild_1.2.0 dynparam_1.0.2 scales_1.1.1
[40] DBI_1.1.1 Rcpp_1.0.6 xtable_1.8-4
[43] bit_4.0.4 httr_1.4.2 ellipsis_0.3.2
[46] pkgconfig_2.0.3 farver_2.1.0 dbplyr_2.1.1
[49] utf8_1.2.1 labeling_0.4.2 tidyselect_1.1.1
[52] rlang_0.4.11 reshape2_1.4.4 later_1.2.0
[55] munsell_0.5.0 cellranger_1.1.0 tools_4.1.0
[58] cachem_1.0.5 cli_2.5.0 generics_0.1.0
[61] ranger_0.12.1 devtools_2.4.2 broom_0.7.7
[64] evaluate_0.14 fastmap_1.1.0 yaml_2.2.1
[67] processx_3.5.2 bit64_4.0.5 fs_1.5.0
[70] tidygraph_1.2.0 lmds_0.1.0 ggraph_2.0.5
[73] mime_0.10 GA_3.2.1 xml2_1.3.2
[76] hdf5r_1.3.3 compiler_4.1.0 rstudioapi_0.13
[79] curl_4.3.1 testthat_3.0.2 reprex_2.0.0
[82] tweenr_1.0.2 stringi_1.6.2 ps_1.6.0
[85] desc_1.3.0 lattice_0.20-44 IRdisplay_1.0
[88] vctrs_0.3.8 pillar_1.6.1 lifecycle_1.0.0
[91] bitops_1.0-7 irlba_2.3.3 httpuv_1.6.1
[94] patchwork_1.1.0.9000 R6_2.5.0 promises_1.2.0.1
[97] gridExtra_2.3 sessioninfo_1.1.1 codetools_0.2-18
[100] MASS_7.3-54 assertthat_0.2.1 pkgload_1.2.1
[103] rprojroot_2.0.2 withr_2.4.2 hms_1.1.0
[106] grid_4.1.0 IRkernel_1.2 misc3d_0.9-0
[109] pbdZMQ_0.3-5 ggforce_0.3.3 shiny_1.6.0
[112] lubridate_1.7.10 base64enc_0.1-3
Thanks
Nicolas
BUG FIX `project_waypoints_coloured()`: Fix wrong results when projec…
rcannood commentedon Jun 27, 2021
Hi @Bio-data-tricks @pawel125 ,
Can you try reinstalling dynplot? (
devtools::install_github("dynverse/dynplot@devel")). The issue should have been resolved.If you can confirm the issue has been solved, I'll submit an update for dynplot to CRAN.
Kind regards,
Robrecht
Bio-data-tricks commentedon Jun 27, 2021
Thank you Robrecht, issue solved !
Bio-data-tricks commentedon Jun 27, 2021
Robrecht,
Have you an idea why I've a bad labels positioning in this umap embedding (doing after the paga trajectory inference) ?
Nicolas
NaijIuc commentedon Jul 16, 2021
Hi Robrecht,
I have the same issue. But no matter how I tried following your suggestions above, I cannot get the program run. The followings are my code, and could you please take a look?
I have tried with devtools::install_github("dynverse/dynplot@devel")
Thanks for your time
cdsoria commentedon Aug 3, 2021
Hi @rcannood. Thank you for such useful tools. Unfortunately, I have the same issue as @NaijIuc. I also installed the devtools::install_github("dynverse/dynplot@devel") and followed the example you have online. Thank you
NaijIuc commentedon Aug 3, 2021
You can try to change R version like 3.6, 4.05, 4.10 etc.. I have no clue why I finally can let it run, but I am highly doubting that is relevant to R version.
cdsoria commentedon Aug 3, 2021
Thanks you. Will try
royfrancis commentedon Aug 12, 2021
I was getting the same error with my data and even with the example from quick-start. Updated to devel version of dynplot and still had the error. I restarted my R session and tried again and it worked. So those getting this error, try again in a clean environment. Probably a conflicting function somewhere.
You can run the short reproducible example below to be sure that it works and it's not your data or the version of dynplot.
Created on 2021-08-12 by the reprex package (v2.0.1)
Session info
Bio-data-tricks commentedon Jan 24, 2023
Hi Everyone,
My figures have a different appearance, less resolute as described in the previous comments (with R4.0, R4.1, R3.5)
Have you an idea please ?
Nicolas