How to make Co-phylogeny plot: easy tanglegram in R

Tanglegrams are co-phylogeny which is a very powerful visualization tool to examine co-evolution. Here is a tutorial on how to make them in R.

Tanglegram is a representation of co-phylogeny where two phylogenetic trees are linked. This method is super useful to visualize common traits shared by both trees. For example, it can be used to visualize host-pathogen (or host-symbiotic) evolution and visualize if there is any phylogenetic concordance between the two phylogenetic trees.

I was in need to visualize co-phylogeny of phylogenetic tree reconstructed from chromosomal and symbiotic genes. Surprisingly, I didn’t find any strait-forward solution in R that can be used for drawing tanglegram. Particularly I wanted to leverage the beautiful ggtree library. After trying out several methods, I found the following approach works well for me so far.

In this post, I’m going to use two toy trees with the following Newick format. Note that they have the same isolate, but different tree-topology (since supposedly different gene-set were used to reconstruct them).

Continue reading “How to make Co-phylogeny plot: easy tanglegram in R”

A note on learning computational biology

Many asks me about learning Bioinformatics. So, I’m going to put some good learning resources in this note.


If you are a complete beginner, don’t aim to ‘understand’ everything discussed in a course or lecture or book. It’s okay to be partially ignorant but still moving forward. Try to go through 60-70% content of the following source within one-two months. The objective in this stage is to get some good understanding of core Bioinformatics concepts and terminology.

Complete Beginner

1. Bioinformatics Methods I and II, offered by Toronto University in massive-open-online-course (MOOC) Coursera.org has pretty good materials (video+tutorial).

2. On Shikkhok.com, a MOOC platform in Bengali language, there is a very short course on Bioinformatics, বায়োইনফরমেটিক্স পরিচিতি, offered by Bio-Bio-1 Foundation.

3. Reading books is the best way. I’ve found ‘Essential Bioinformatics’ by Jin Xiong an easy to understand book.

Continue reading “A note on learning computational biology”