Error in MRCA function
Closed this issue · 2 comments
jonbra commented
Hi,
I'm trying to view a subclade using the viewClade() function following your example. But MRCA throws an error. I installed the dev version of ggtree.
library(ggtree)
nwk <- system.file("extdata", "sample.nwk", package="treeio")
tree <- read.tree(nwk)
p <- ggtree(tree) + geom_tiplab()
viewClade(p, MRCA(p, tip=c("I", "L")))
Error in MRCA(.data$data, .node1, .node2 = .node2, ...) :
argument ".node1" is missing, with no default
In addition: Warning messages:
1: In get_clade_position_(treeview$data, node) :
restarting interrupted promise evaluation
2: In get_clade_position_(treeview$data, node) :
restarting interrupted promise evaluation
3: In get_clade_position_(treeview$data, node) :
restarting interrupted promise evaluation
session info:
> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 20
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=nb_NO.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=nb_NO.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggtree_3.3.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.8 pillar_1.7.0 compiler_4.1.2
[4] yulab.utils_0.0.4 tools_4.1.2 digest_0.6.29
[7] aplot_0.1.2 evaluate_0.14 jsonlite_1.7.3
[10] tidytree_0.3.7 lifecycle_1.0.1 tibble_3.1.6
[13] nlme_3.1-155 gtable_0.3.0 lattice_0.20-45
[16] pkgconfig_2.0.3 rlang_1.0.1 cli_3.1.1
[19] DBI_1.1.2 ggplotify_0.1.0 rstudioapi_0.13
[22] patchwork_1.1.1 yaml_2.2.2 parallel_4.1.2
[25] xfun_0.29 treeio_1.19.1 fastmap_1.1.0
[28] knitr_1.37 dplyr_1.0.8 generics_0.1.2
[31] vctrs_0.3.8 gridGraphics_0.5-1 grid_4.1.2
[34] tidyselect_1.1.1 glue_1.6.1 R6_2.5.1
[37] fansi_1.0.2 rmarkdown_2.11 pacman_0.5.1
[40] farver_2.1.0 ggplot2_3.3.5 purrr_0.3.4
[43] tidyr_1.2.0 magrittr_2.0.2 htmltools_0.5.2
[46] scales_1.1.1 ellipsis_0.3.2 assertthat_0.2.1
[49] ape_5.6-1 colorspace_2.0-2 labeling_0.4.2
[52] utf8_1.2.2 lazyeval_0.2.2 munsell_0.5.0
[55] ggfun_0.0.5 crayon_1.4.2
xiangpin commented
Please just use .node1 to replace the tip.
jonbra commented
That works, thanks!