-
Notifications
You must be signed in to change notification settings - Fork 5
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: Must supply a symbol or a string as argument #54
Comments
…ymbol or a string as argument" (#54).
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: library(dyno)
library(tidyverse)
ur_counts <- matrix(runif(1000), nrow = 40)
rownames(ur_counts) <- paste0("cell_", seq_len(nrow(ur_counts)))
colnames(ur_counts) <- paste0("gene_", seq_len(ncol(ur_counts)))
ur_normalized <- ur_counts
ur <- list(seurat_clusters = round(ur_counts[,1]*10))
dataset <- wrap_expression(
counts = t(ur_counts),
expression = t(ur_normalized)
) %>%
add_grouping(ur$seurat_clusters)
model <- infer_trajectory(dataset, tislingshot::ti_slingshot())
head(get_dimred(model), 5)
plot_dimred(model) Can you run Kind regards, |
Hey Nicolas,
Can you provide me with a reproducible example?
Thanks
Robrecht
…On Sun, 27 Jun 2021, 11:44 n.GoFF, ***@***.***> wrote:
Hi Pawel125,
I have the same issue with my data. The same code works well two weeks ago.
[image: Capture]
<https://user-images.githubusercontent.com/25744843/123540009-f6968000-d73c-11eb-9b27-11fd04bf9e2d.PNG>
Nicolas
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEHFKTQU2AY37PI64BDBCDTU3XHTANCNFSM47HTPOPA>
.
|
Hi Robrecht, Here is the code, dataset <- wrap_expression(
counts = X,
expression = X,
dimred_acp = dyndimred::dimred_pca(X))
model_paga <- infer_trajectory(
dataset = dataset,
method = dynmethods::ti_projected_paga(filter_features = FALSE,
n_neighbors =15L,
resolution = 1L,
embedding_type = "umap"),
verbose = FALSE)
plot_dimred(model_paga, grouping = group_onto_nearest_milestones(model_paga), label_milestones=TRUE) I have just updated the packages dynmethods, dynplot,dyno with devtools::install_github("dynverse/dynplot") R version 4.1.0 (2021-05-18) Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): Thanks Nicolas |
Hi @Bio-data-tricks @pawel125 , Can you try reinstalling dynplot? ( If you can confirm the issue has been solved, I'll submit an update for dynplot to CRAN. Kind regards, |
Thank you Robrecht, issue solved ! |
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
|
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. |
Thanks you. Will try |
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: hdf5r
model <- 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 Created on 2021-08-12 by the reprex package (v2.0.1) Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.0 (2021-05-18)
#> os Ubuntu 20.04.2 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_GB:en
#> collate en_GB.UTF-8
#> ctype en_GB.UTF-8
#> tz Europe/Stockholm
#> date 2021-08-12
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.0)
#> babelwhale 1.0.3 2021-06-25 [1] CRAN (R 4.1.0)
#> bit 4.0.4 2020-08-04 [1] CRAN (R 4.1.0)
#> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.1.0)
#> carrier 0.1.0 2018-10-16 [1] CRAN (R 4.1.0)
#> cli 3.0.1 2021-07-17 [1] CRAN (R 4.1.0)
#> codetools 0.2-18 2020-11-04 [1] CRAN (R 4.1.0)
#> colorspace 2.0-2 2021-06-24 [1] CRAN (R 4.1.0)
#> crayon 1.4.1 2021-02-08 [1] CRAN (R 4.1.0)
#> curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.0)
#> DBI 1.1.1 2021-01-15 [1] CRAN (R 4.1.0)
#> desc 1.3.0 2021-03-05 [1] CRAN (R 4.1.0)
#> digest 0.6.27 2020-10-24 [1] CRAN (R 4.1.0)
#> dplyr * 1.0.7 2021-06-18 [1] CRAN (R 4.1.0)
#> dyndimred 1.0.4 2021-03-23 [1] CRAN (R 4.1.0)
#> dynfeature * 1.0.0 2021-08-12 [1] Github (dynverse/dynfeature@62981ce)
#> dynguidelines * 1.0.1 2021-08-12 [1] Github (dynverse/dynguidelines@57f2da7)
#> dynmethods * 1.0.5 2021-08-12 [1] Github (dynverse/dynmethods@53c6d1d)
#> dyno * 0.1.2 2021-08-12 [1] Github (dynverse/dyno@c461023)
#> dynparam 1.0.2 2021-01-04 [1] CRAN (R 4.1.0)
#> dynplot * 1.1.1 2021-08-12 [1] Github (dynverse/dynplot@8fff437)
#> dynutils 1.0.6 2021-03-22 [1] CRAN (R 4.1.0)
#> dynwrap * 1.2.2 2021-08-12 [1] Github (dynverse/dynwrap@250758b)
#> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.0)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.1.0)
#> fansi 0.5.0 2021-05-25 [1] CRAN (R 4.1.0)
#> farver 2.1.0 2021-02-28 [1] CRAN (R 4.1.0)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.0)
#> foreach 1.5.1 2020-10-15 [1] CRAN (R 4.1.0)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.1.0)
#> GA 3.2.1 2021-04-21 [1] CRAN (R 4.1.0)
#> generics 0.1.0 2020-10-31 [1] CRAN (R 4.1.0)
#> ggforce 0.3.3 2021-03-05 [1] CRAN (R 4.1.0)
#> ggplot2 3.3.5 2021-06-25 [1] CRAN (R 4.1.0)
#> ggraph 2.0.5 2021-02-23 [1] CRAN (R 4.1.0)
#> ggrepel 0.9.1 2021-01-15 [1] CRAN (R 4.1.0)
#> glue 1.4.2 2020-08-27 [1] CRAN (R 4.1.0)
#> graphlayouts 0.7.1 2020-10-26 [1] CRAN (R 4.1.0)
#> gridExtra 2.3 2017-09-09 [1] CRAN (R 4.1.0)
#> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.0)
#> hdf5r 1.3.3 2020-08-18 [1] CRAN (R 4.1.0)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.1.0)
#> hms 1.1.0 2021-05-17 [1] CRAN (R 4.1.0)
#> htmltools 0.5.1.1 2021-01-22 [1] CRAN (R 4.1.0)
#> httpuv 1.6.1 2021-05-07 [1] CRAN (R 4.1.0)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.0)
#> igraph 1.2.6 2020-10-06 [1] CRAN (R 4.1.0)
#> irlba 2.3.3 2019-02-05 [1] CRAN (R 4.1.0)
#> iterators 1.0.13 2020-10-15 [1] CRAN (R 4.1.0)
#> knitr 1.33 2021-04-24 [1] CRAN (R 4.1.0)
#> labeling 0.4.2 2020-10-20 [1] CRAN (R 4.1.0)
#> later 1.2.0 2021-04-23 [1] CRAN (R 4.1.0)
#> lattice 0.20-44 2021-05-02 [1] CRAN (R 4.1.0)
#> lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.1.0)
#> lmds 0.1.0 2019-09-27 [1] CRAN (R 4.1.0)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.0)
#> MASS 7.3-54 2021-05-03 [1] CRAN (R 4.1.0)
#> Matrix 1.3-4 2021-06-01 [1] CRAN (R 4.1.0)
#> mime 0.11 2021-06-23 [1] CRAN (R 4.1.0)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.0)
#> patchwork 1.1.1 2020-12-17 [1] CRAN (R 4.1.0)
#> pillar 1.6.2 2021-07-29 [1] CRAN (R 4.1.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.0)
#> plyr 1.8.6 2020-03-03 [1] CRAN (R 4.1.0)
#> polyclip 1.10-0 2019-03-14 [1] CRAN (R 4.1.0)
#> processx 3.5.2 2021-04-30 [1] CRAN (R 4.1.0)
#> promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.1.0)
#> proxyC 0.2.0 2021-05-11 [1] CRAN (R 4.1.0)
#> ps 1.6.0 2021-02-28 [1] CRAN (R 4.1.0)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.0)
#> R6 2.5.0 2020-10-28 [1] CRAN (R 4.1.0)
#> ranger 0.13.1 2021-07-14 [1] CRAN (R 4.1.0)
#> RColorBrewer 1.1-2 2014-12-07 [1] CRAN (R 4.1.0)
#> Rcpp 1.0.7 2021-07-07 [1] CRAN (R 4.1.0)
#> RcppParallel 5.1.4 2021-05-04 [1] CRAN (R 4.1.0)
#> readr 2.0.1 2021-08-10 [1] CRAN (R 4.1.0)
#> remotes 2.4.0 2021-06-02 [1] CRAN (R 4.1.0)
#> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.0)
#> reshape2 1.4.4 2020-04-09 [1] CRAN (R 4.1.0)
#> rlang 0.4.11 2021-04-30 [1] CRAN (R 4.1.0)
#> rmarkdown 2.10 2021-08-06 [1] CRAN (R 4.1.0)
#> rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.1.0)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.0)
#> scales 1.1.1 2020-05-11 [1] CRAN (R 4.1.0)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.1.0)
#> shiny 1.6.0 2021-01-25 [1] CRAN (R 4.1.0)
#> stringi 1.7.3 2021-07-16 [1] CRAN (R 4.1.0)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.1.0)
#> tibble 3.1.3 2021-07-23 [1] CRAN (R 4.1.0)
#> tidygraph 1.2.0 2020-05-12 [1] CRAN (R 4.1.0)
#> tidyr 1.1.3 2021-03-03 [1] CRAN (R 4.1.0)
#> tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.0)
#> tweenr 1.0.2 2021-03-23 [1] CRAN (R 4.1.0)
#> tzdb 0.1.2 2021-07-20 [1] CRAN (R 4.1.0)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.0)
#> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.0)
#> viridis 0.6.1 2021-05-11 [1] CRAN (R 4.1.0)
#> viridisLite 0.4.0 2021-04-13 [1] CRAN (R 4.1.0)
#> withr 2.4.2 2021-04-18 [1] CRAN (R 4.1.0)
#> xfun 0.25 2021-08-06 [1] CRAN (R 4.1.0)
#> xml2 1.3.2 2020-04-23 [1] CRAN (R 4.1.0)
#> xtable 1.8-4 2019-04-21 [1] CRAN (R 4.1.0)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.0)
#>
#> [1] /home/roy/miniconda3/envs/r-4.1/lib/R/library |
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 |
Hi!
Thanks for developping of this awesome package! Could you help me to resolve the following error?
This is the code that I used and the error message that I receive:
And further info:
What can be wrong?
Best,
Paweł
The text was updated successfully, but these errors were encountered: