ggtree
ggtree copied to clipboard
R Session Aborted when calling ggtree()
Hi,
I'm trying to draw a handful of phylogenies in ggtree, however, my R session aborts when calling the function, after encountering a fatal error. Unsure what is causing this.
I'm simply running these two lines:
COIArgK <- read.beast('phylogenies/COI_ArgK_2_output.tree')
p <- ggtree(COIArgK)
Any and all help will be greatly appreciated! Best, James
My Session Info:
R version 4.0.4 (2021-02-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_2.4.2 usethis_2.0.1 ape_5.5 ggspatial_1.1.5 ggrepel_0.9.1 sf_1.0-2 ozmaps_0.4.5 treeio_1.17.2
[9] ggtree_3.1.3.991 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 readr_2.0.1 tidyr_1.1.3 tibble_3.1.3
[17] ggplot2_3.3.5 tidyverse_1.3.1
Please provide the COI_ArgK_2_output.tree
file and the error information.
I have similar issue my own data also crash R session on ggtree(tree) line
library(ggtree)
tree = ggtree::read.tree("mytree.tre")
ggtree(tree) #<--- here crashing
mytree contains the following
('B':0.010619784,('C':5.0E-9,'D':0.007047331):0.003520691);
which is a valid Newick format that all programs I tried including TreeViewX can read.
I can run this example on my local computer. Are you using Rstudio
? Which version of R
and Rstudio
you are using.
R version 4.1.1 (2021-08-10) -- "Kick Things" Rstudio Version 1.4.1106 ggtree 3.0.3
Hint: Running from command line results in no crash, I'll try updating Rstudio
R CMD BATCH ggtreePlot.R
Updating Rstudio version solved the problem! It worked for me as well with Rstudio Version 1.4.1717.
@lesserof2weevils can you confirm it also solves the problem for you? If so we can close this issue.
This is currently happening to me as well, all of a sudden (no updates since it last worked)
tree <- phy_tree(MAGs.ps) tree$tip.label <- MAGs.ps %>% tax_table %>% as.data.frame
p <- ggtree(tree, layout="circular")
However, using the original MAGs.ps phyloseq object directly works (but that's not what I need)
I'm running the latest RStudio. Here's my session info if that can help:
sessionInfo() R version 4.3.1 (2023-06-16) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.5.2
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Montreal tzcode source: internal
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggtreeExtra_1.12.0 ggtree_3.10.0 magrittr_2.0.3 lubridate_1.9.3
[5] forcats_1.0.0 stringr_1.5.0 dplyr_1.1.3 purrr_1.0.2
[9] readr_2.1.4 tidyr_1.3.0 tibble_3.2.1 ggplot2_3.4.4
[13] tidyverse_2.0.0 ape_5.7-1 pacman_0.5.1 phyloseq_1.46.0
loaded via a namespace (and not attached):
[1] bitops_1.0-7 permute_0.9-7
[3] rlang_1.1.1 ade4_1.7-22
[5] matrixStats_1.0.0 compiler_4.3.1
[7] mgcv_1.9-0 vctrs_0.6.4
[9] reshape2_1.4.4 pkgconfig_2.0.3
[11] crayon_1.5.2 fastmap_1.1.1
[13] XVector_0.42.0 utf8_1.2.4
[15] tzdb_0.4.0 zlibbioc_1.48.0
[17] cachem_1.0.8 aplot_0.2.2
[19] GenomeInfoDb_1.38.0 jsonlite_1.8.7
[21] biomformat_1.30.0 rhdf5filters_1.14.0
[23] DelayedArray_0.28.0 Rhdf5lib_1.24.0
[25] BiocParallel_1.36.0 parallel_4.3.1
[27] cluster_2.1.4 R6_2.5.1
[29] stringi_1.7.12 GenomicRanges_1.54.1
[31] Rcpp_1.0.11 SummarizedExperiment_1.32.0
[33] iterators_1.0.14 IRanges_2.36.0
[35] Matrix_1.6-1.1 splines_4.3.1
[37] igraph_1.5.1 timechange_0.2.0
[39] tidyselect_1.2.0 rstudioapi_0.15.0
[41] abind_1.4-5 vegan_2.6-4
[43] codetools_0.2-19 lattice_0.22-5
[45] plyr_1.8.9 Biobase_2.62.0
[47] treeio_1.26.0 withr_2.5.2
[49] gridGraphics_0.5-1 survival_3.5-7
[51] Biostrings_2.70.1 pillar_1.9.0
[53] MatrixGenerics_1.14.0 foreach_1.5.2
[55] stats4_4.3.1 ggfun_0.1.3
[57] generics_0.1.3 RCurl_1.98-1.12
[59] S4Vectors_0.40.1 hms_1.1.3
[61] munsell_0.5.0 scales_1.2.1
[63] tidytree_0.4.5 glue_1.6.2
[65] lazyeval_0.2.2 tools_4.3.1
[67] ggnewscale_0.4.9 data.table_1.14.8
[69] locfit_1.5-9.8 fs_1.6.3
[71] rhdf5_2.46.0 grid_4.3.1
[73] colorspace_2.1-0 nlme_3.1-163
[75] GenomeInfoDbData_1.2.11 patchwork_1.1.3
[77] cli_3.6.1 fansi_1.0.5
[79] S4Arrays_1.2.0 gtable_0.3.4
[81] yulab.utils_0.1.0 DESeq2_1.42.0
[83] digest_0.6.33 BiocGenerics_0.48.0
[85] SparseArray_1.2.0 ggplotify_0.1.2
[87] memoise_2.0.1 multtest_2.58.0
[89] lifecycle_1.0.3 MASS_7.3-60