data_visualization
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
data_visualization [2018/12/18 14:17] – [gplots 패키지의 heatmap.2() 함수 이용] hyjeong | data_visualization [2023/02/15 10:43] (current) – [Heatmap 그림과 phylogenetic tree의 결합] hyjeong | ||
---|---|---|---|
Line 42: | Line 42: | ||
=== 컬럼의 배열 순서를 임의로 바꾸기 === | === 컬럼의 배열 순서를 임의로 바꾸기 === | ||
+ | myord라는 벡터를 하나 생성하여 컬럼 이름을 여기에 순서대로 넣는다. 그리고 다음과 같이 하면 그만이다. 이는 row에 대해서도 똑같이 적용할 수 있다. 이렇게 쉬운 것을 모르고 for 구문을 쓸 궁리를 하다니! | ||
+ | > data_new = data3[, myord] | ||
=== 특정 row만을 뽑아내어 후속 분석에 사용하고 싶다면 === | === 특정 row만을 뽑아내어 후속 분석에 사용하고 싶다면 === | ||
Line 130: | Line 132: | ||
> d = read.table(" | > d = read.table(" | ||
> fit = hclust(dist(as.matrix(d)), | > fit = hclust(dist(as.matrix(d)), | ||
+ | # heatmap.2() 함수는 complete agglomeration method를 클러스터링에 사용한다. average method는 UPGMA와 같다. | ||
> my_tree=as.phylo(fit) | > my_tree=as.phylo(fit) | ||
> write.tree(phy=my_tree, | > write.tree(phy=my_tree, | ||
Line 135: | Line 138: | ||
[[https:// | [[https:// | ||
- | 그 반대로, 다른 도구를 통해 만든 tree를 heatmap.2() 함수에 공급할 방법은 없을까? 내가 알기로 그것은 불가능하고, | + | 그 반대로, 다른 도구를 통해 만든 tree를 heatmap.2() 함수에 공급할 방법은 없을까? 내가 알기로 그것은 불가능하고, |
+ | |||
+ | 다음은 보다 상세한 heatmap 작성 관련 기술 문서이다. | ||
+ | |||
+ | [[https:// | ||
===== iTOL 이용하기 ===== | ===== iTOL 이용하기 ===== | ||
[[https:// | [[https:// |
data_visualization.1545110225.txt.gz · Last modified: (external edit)