How to draw evolution tree and heat map in R language
Today, the editor will share with you the relevant knowledge points about how to draw evolution trees and heat maps in R language. the content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article, let's take a look at it.
Phylogenetic tree: also known as cluster tree or evolutionary tree, is a method in bioinformatics to describe the relationships between different organisms.
Function: by drawing the evolutionary tree analysis, we can understand the main composition of the phylogenetic tree of the evolutionary history of all organisms, find out the evolutionary relationship between different species, understand the relationship between ancestral sequences and their offspring, and estimate the divergence time between a group of species with a common ancestor.
I. preparation of documents:
Tree file: nwk format: tree.nwk
Script: tree_heatmap_plot.r
Script code:
#! / usr/bin/env Rscriptlibrary (getopt) library (ggtree) library (EBImage) library (ggplot2) library (stringr) library (reshape2) spec