0

I've been struggling in R for a while, i'm new to phylogenetic analysis and the models worked out but the tree visualisation is not. I'm using an existing phylogenetic tree of (almost) all bird species (Jetz, W., Thomas, G., Joy, J. et al. The global diversity of birds in space and time. Nature 491, 444–448 (2012). https://doi.org/10.1038/nature11631). I can plot this just fine, although it is a bit cramped and therefore not so pretty (ape and treeman packages).

i've constructed a dataset which includes a binary trait (for all species) and allso a column to which family they belong, and the tiplabel which is matched to the phylogenetic tree. Now ik can plot the trait on the tree tips, but since it are so many species it is not looking pretty. I really want to collaps the tree to the "family"level (column in my dataset) and than preferably also color the new "family tips" according to the percentage of species within it displaying the binary trait.

I have found way to collaps trees according to internal nodes etc, but it's not exactly what i want. I've also attempted this in figtree, but manually collapsing with such large data is not really a managable approach. I would prefer to use R.

If anyone has a solution for this, that would be great! thank you in advance, have a nice day!

cynthia
  • 11
  • 1
  • Hi @cynthia, please share data and code you are using so we can reproduce the issue you are having. https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example. I'm looking forward to trying to help you out! – Skaqqs Sep 16 '21 at 20:18

0 Answers0