Hi, I just started to use Dendropy to analyze the correlation of traits on a phylogenetic tree. I am wondering if I can add trait/character to an existing Nexus tree in Python?
And I would also like to consistently simulate traits and compute contrasts once the simulation is done.
Concretely, I have a baleen whales' tree (see the attached nex file). And Now I have the traits of species, for example, a list like this
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
with species labels
['B.acutorostrata','B.bonaerensis','B.borealis','B.brydei','B.edeni','B.musculus','B.mysticetus','B.omurai','B.physalus','C.marginata','E.australis','E.glacialis','E.japonica','E.robustus','M.novaeangliae']
How can I add this trait to the tree to compute contrasts?
Furthermore, if I have a ndarray of traits
array([1,...15],
[1,...,15],
...,
[1,...,15])
Can I add them to the tree and compute contrasts for each row of it?
Thanks!