Question: Plots two phylogenetic trees face to face
gravatar for luzglongoria
9 months ago by
luzglongoria20 wrote:


I have two phylogenetic trees (extension .nex) and need to plot them face to face with links between them.

I have also done a .cvs file with the associations between these two trees.

However, when I try ro run the commands that I have found I got some error message:

two trees

tree.nex <- rtree(40) parasitetree.nex <- rtree(20)

creation of the association matrix:

association <- read.csv("assoc.csv") cophyloplot(tree.nex, parasitetree.nex, assoc = association, length.line = 4, space = 28, gap = 3)

then I get this error:

Error: $ operator is invalid for atomic vectors

If I try with:

trees<-read.tree("Tree.nex") tree.nex<-trees[[1]] parasitetree.nex<-trees[[2]] assoc<-read.csv("assoc.csv") obj<-cophylo(tree.nex,parasitetree.nex,assoc=assoc, print=TRUE)


Error in cophylo(tree.nex, parasitetree.nex, assoc = assoc, print = TRUE) : tr1 & tr2 should be objects of class "phylo".

Any help is more than welcome :)

trees phytools ape • 339 views
ADD COMMENTlink written 9 months ago by luzglongoria20

Not sure about your code solution, but you can do this with Dendroscope. What you're looking for (I think) are tanglegrams.

ADD REPLYlink written 9 months ago by jrj.healey13k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1734 users visited in the last hour