ggtree
ggtree copied to clipboard
Help!
Hi Guangchuang,
I used your ggtree package with success a year or so ago but can't repeat what I did then, using the dat input material/data, after updating R/ggtree/everything, since.
I get the following error message when trying to draw the tree : Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) : group length is 0 but data length > 0### Prerequisites
My approach (which worked last time) was as follows:
read in my "phylip/newick" type file.
tree <- read.tree("tk.ph.phy")
use 'ape' to write this into a format that ggtree understand better.
write.tree(tree, file = "eKin.nwk", append = TRUE, digits = 10, tree.names = TRUE)
create a tempfile to fill with out data and tree:
outfile <- tempfile()
specify path of our kinome tree file (which I have converted to nwk file format using 'ape')
eKin_tree <- paste("eKin.nwk")
create a jplace object using ggtree and then read it back in:
write.jplace(eKin_tree, data, outfile) eKin_jp <- read.jplace(outfile)
plot the tree in circular form:
ggtree(eKin_jp, layout = "circular")
Any help would be gratefully received.
Best Regards,
Dean