ggtree
ggtree copied to clipboard
Bug for @brj1: install GitHub fails
Prerequisites
- [x] Have you read Feedback and follow the guide?
- [x] make sure your are using the latest release version
- [x] read the documents
- [x] google your quesion/issue
Describe you issue
- [x] Make a reproducible example (e.g. 1)
- [x] your code should contain comments to describe the problem (e.g. what expected and actually happened?)
Hi @brj1, I wanted to use your density trees plot (as requested in #134), that has not made it yet into ggtree. Sadly, already the installation of it fails:
# Sure, we've installed tidytree
library(tidytree)
# Install @brj1's for of ggtree
devtools::install_github("brj1/ggtree")
This results in an error:
Downloading GitHub repo brj1/ggtree@master
✔ checking for file ‘/tmp/Rtmpfu4zfC/remotes19d1498b26b9/brj1-ggtree-36d4cf2/DESCRIPTION’ ...
─ preparing ‘ggtree’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘ggtree_1.13.6.tar.gz’
Installing package into ‘/home/richel/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
* installing *source* package ‘ggtree’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
Error : object ‘as_data_frame’ is not exported by 'namespace:tidytree'
ERROR: lazy loading failed for package ‘ggtree’
* removing ‘/home/richel/R/x86_64-pc-linux-gnu-library/3.4/ggtree’
* restoring previous ‘/home/richel/R/x86_64-pc-linux-gnu-library/3.4/ggtree’
Error in i.p(...) :
(converted from warning) installation of package ‘/tmp/Rtmpfu4zfC/file19d1d42f5ba/ggtree_1.13.6.tar.gz’ had non-zero exit status
Apparently, the tidytree has its interface changed. I hope you, @brj1, can fix it :+1:.
Ask in right place
- [x] for bugs or feature requests, post here (github issue)
- [ ] for questions, please post to google group
Sorry Guangchuang for using your repo for this Issue. It is just that forks do not have their own Issues...
since as_data_frame is not a generic method anymore in tibble and will remove in future release, I just change the as_data_frame to as_tibble in tidytree.
I think what @brj1 need is to merge upstream from my repo.
I agree @GuangchuangYu . I'm trying to merge, but I am have trouble buiding the latest version of ggtree.
EDIT: in particular I get the error message:
* installing to library ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library’
* installing *source* package ‘ggtree’ ...
** R
Error in parse(outFile) :
/Users/bjones/git/ggtree/R/reexports.R:3:11: unexpected SPECIAL
2: ##' @export
3: magrittr::%>%
^
ERROR: unable to collate and parse R files for package ‘ggtree’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ggtree’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ggtree’
Rolling back to 9416b852753df fixes the issue.
Okay I pushed my merge with 9416b852753df . I was able to build it, but I haven't tested it yet.
Okay I got it working. The following displays correctly:
library(ape)
library(ggtree)
# Here I create two trees. In one tree, taxon 'C' is the outlier. In the other tree, taxon 'B' is the outlier
tree_1 <- ape::read.tree(text = "((A:2,B:2):1, C:3);")
tree_2 <- ape::read.tree(text = "((A:1,C:1):2, B:3);")
trees <- list(tree_1, tree_2)
# Show them overlapping
ggtree::ggdensitree(trees, layout='rectangular') + ggtree::geom_tiplab()
fixed R check for previous commit :)
It works now.