Plots two phylogenetic trees face to face
0
0
Entering edit mode
6.0 years ago
luzglongoria ▴ 50

hi,

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)

Then,

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 :)

ape phytools trees • 1.8k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2320 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6