how to estimate phylogeny without DNA sequences? I am new to bioinformatics, I am reading ‘Analysis of Phylogenetics Second Edition and Evolution with R’ from Emmanuel Paradis.
I can create phylogeny from DNA sequences, by first calculating the distances and then using (ie nj() function).
My question is: if instead of DNA I have trait data (ie height and weight of species), how can I estimate a phylogeny? (is the same process valid? somehow calculate distances and pass that to nj()?)
Sequence data is basically always better and at this point in history it is de rigueur for any serious study, but originally phylogenies were all based on (ideally discrete) phenotypic characters, so there's no reason why it can't work in principle. As @Pallie mentions in a comment, the clustering methods in e.g. NJ or UPGMA will work on any set of distance measures, and they were in fact originally developed on phenotypic characters rather than sequence data.
I'd recommend taking a look at chapter 24 of Joe Felsenstein's book on phylogenies, which is digitized here (yes the link looks sketchy, sorry). There is a section on p. 425 &quot;Inferring phylogenies and correlations&quot;, which discusses how you can in principle use quantitative characters to infer phylogenies. The theory and math for why this is supposed to work is earlier in the chapter.
In many cases people prefer to code the characters as discrete because it makes it easier to work with. But there are also methods that work with the raw quantitative characters.
In R, you should be able to do something like this:
# some simulated data, species are rows and characters are columns
&gt; data
      char1 char2 char3
spec1     0     3     6
spec2     1     4     7
spec3     2     5     8

&gt; library(ape)
&gt; tr = nj(dist(data))
&gt; plot(tr)