This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Draw A Tree Clustering Figure As Shown?

enter image description here

Could anyone tell me how the alignment of two trees in this figure is drawn? Thanks!

Reference: Phylogenetic Distribution of Potential Cellulases in Bacteria

It loks like they are two different clusterings (trees) of the same input data. So there is just a grey line connecting the same dataset. Or did you want to know a tool that does things like this? The clustering or just the visualisation?

Can you specify the paper from which this figure is taken?

2 answers

The R library ape has a function called cophyloplot that should get you started. You provide two trees and matrix describing the association between tip-lables in each tree (they don't have to be 1:1 and missing taxa are OK). Here's the example from the function's docs

tree1<-rtree(40) #random tree with 40 leaves
tree2<-rtree(20) #random tree with 20 leaves

#creation of the association matrix
association<-matrix(ncol=2, nrow=40)
association[,1]<-association[,2]<-tree2$tip.label

#plot
cophyloplot(tree1, tree2, assoc=association, length.line=4, space=28, gap=3)

If the tip labels in your tree match up you can set your association matricx to

replicate(2, your_tr $tip.label)

I think that a "simple" way would be to build both trees....concatenate all the sequences in the order found in the tree and run a synteny plot. This would not scale the same as the trees...but would give you an idea.

Log in to answer this question.