4

Quick interactive phylogenetic tree in R

 1 year ago
source link: https://gist.github.com/andersgs/82b3fd51f7d44bc87179d456805c60d6
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Quick interactive phylogenetic tree in R · GitHub

Instantly share code, notes, and snippets.

Created February 20, 2018 03:54
Quick interactive phylogenetic tree in R

Author

Note that I am cheating a bit. I added label to the aes in geom_point to get that info when mousing over. For that, I get a warning when I run the code above about ignoring the unknown aesthetic label.

Thanks, good stuff. How can you remove the duplicate x and y labels?

@teshu02 You can specify which aesthetics show when mousing over nodes by setting the tooltip parameter within the ggplotly function.

Example using above snippet:
plotly::ggplotly(p2, tooltip = "label")

I can not get the other layout options of ggtree to work properly. I get warnings and just part of the plot. Do you know how can I fix this?

I get an error with the aesthetic label: Warning: Ignoring unknown aesthetics: label

re @gotwals it seems as though the same general output can be achieved by switching to geom_text i.e.:

p2 <- p1 +
  geom_text(data = metat,
             aes(x = x,
                 y = y,
                 colour = grp,
                 label = id))

I don't know if you can see this, but this code works really well.
Is there any way to additionally display the bootstrap value or tip label as the ID of the sample rather than the group?

</div


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK