User Tools

Site Tools


data_visualization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
data_visualization [2018/12/18 15:28]
hyjeong [매트릭스 형태의 텍스트 파일을 R에서 읽어들이기(1)]
data_visualization [2019/01/03 12:04] (current)
hyjeong [Heatmap 그림과 phylogenetic tree의 결합]
Line 132: Line 132:
   > d = read.table("​matrix_pyani.tab",​sep="​\t",​header=T,​row.names=1)   > d = read.table("​matrix_pyani.tab",​sep="​\t",​header=T,​row.names=1)
   > fit = hclust(dist(as.matrix(d)),​method="​average"​)   > fit = hclust(dist(as.matrix(d)),​method="​average"​)
 +  # heatmap.2() 함수는 complete agglomeration method를 클러스터링에 사용한다. average method는 UPGMA와 같다.
   > my_tree=as.phylo(fit)   > my_tree=as.phylo(fit)
   > write.tree(phy=my_tree,​file="​test.newick"​)   > write.tree(phy=my_tree,​file="​test.newick"​)
data_visualization.txt · Last modified: 2019/01/03 12:04 by hyjeong