I wanted to create a phylogenetic tree where I can trace a certain dimension throughout clades. I followed the tutorial by Winternitz 2016, but now I run into some problems.
Here is what I did so far:
tablename<- read.table(file("clipboard"), header=TRUE)
library(adegenet)
library(ape)
library(caper)
library(devtools)
library(geiger)
library(picante)
library(phytools)
library(stringr)
library(TreeTools)
supertree<-ReadTntTree("Pathname", tipLabels =1:36)
plot(supertree,no.margin=TRUE,edge.width=2) #to check if my tree is displayed correctly
Now I have the problem that my tree has (created by TNT) numbers as represenatives of taxa instead of the taxa names. For the copied table I created a column for the number and the second one is the taxon which is represented by the number. Column 3,4 and 5 are filled with either measurements or NA (for not avaiable). The names of the columns are code (column 1), specimen (column 2), HFM (column 3), WFM (column 4) and Wpp (column 5)
My questions are now:
- How can I replace the numbers in my plotted tree with their representative taxon name?
- I personally find the commands in the pdf a bit confusing regarding using the table data for mapping traits. How can I create the connection between the pasted table/the dataset with the tree and how do I follow up then?
Thank you already for reading and I am looking forward for an answer
Sincerely
Edit: After the quick comment I also attached a link to the files I can provide. I hope this helps to reproduce my progress so far -
https://drive.google.com/drive/folders/1CJBwCrSIkFqO6qvh0UH0yEiWtDwNpK1B?usp=sharing