Rotating/flipping multiple clades in ggtree
0
1
Entering edit mode
8.2 years ago
723388 ▴ 10

Hello all

I am currently rotate 2 different clades on ggtree and I keep running into errors. The code is as follows

a <- groupClade(tree, c(289,294)) + groupClade(tree, c(162,197)) b <- ggtree(Grouped,layout = "circular",branch.length = 0,) Rotated_Tree <- rotate(b, 289) %>% rotate(294) + rotate(b,162) %>% rotate(197) Error in get.offspring.df(df, node) : input node is a tip...

I tried to use the flip function instead as the grouped clades share the same parent. plot(b,flip(b,289,294) + flip(b,162,197)) Error in flip(b, 289, 294) : node1 and node2 should share a same parent node... Node 1 and 2 do share a parent node and this same error occurs when trying to flip 162 and 197.

Please advise, thank you for any correspondence.

Kind regards Warren

ggtree R • 3.1k views
ADD COMMENT
0
Entering edit mode

pls follow the guide and post a reproducible example.

ADD REPLY

Login before adding your answer.

Traffic: 2965 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6