02_make_figure.r

Date Written:

2015-08-22

Description:

Produce a nicer summary figure of sequence and structure clustering.
See ‘01_look_see_download.r’ for data setup and exploratory analysis.

Usage and versions:

Developed in interactive R mode then rendered with rmarkdown (i.e.)
library(rmarkdown); render("02_make_figure.r")

See sessionInfo() output at end.

# Load required packages
library(bio3d)
library(dendextend)

# Load processed data
load("../data/01_store.RData")

# Figure setup
tanglegram(hc, hc.rmsd, lab.cex=0.6, 
    main_left ="Sequence Clustering", main_right="Structure Clustering"
    , common_subtrees_color_branches=TRUE, lwd=2)

## Lets plot a larger PDF version
pdf("../results/tanglegram_figure.pdf", width=9, height=7)

tanglegram(hc, hc.rmsd, lab.cex=0.6, 
    main_left ="Sequence Clustering", main_right="Structure Clustering"
    , common_subtrees_color_branches=TRUE, lwd=2)

dev.off()
## quartz_off_screen 
##                 2
# Report on software versions
sessionInfo()
## R version 3.1.2 (2014-10-31)
## Platform: x86_64-apple-darwin13.4.0 (64-bit)
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] dendextend_1.1.0  bio3d_2.2-2.9000  rmarkdown_0.5.3.1
## 
## loaded via a namespace (and not attached):
##  [1] bitops_1.0-6     colorspace_1.2-6 digest_0.6.8     evaluate_0.7    
##  [5] grid_3.1.2       htmltools_0.2.6  knitr_1.10.5     magrittr_1.5    
##  [9] parallel_3.1.2   Rcpp_0.11.6      RCurl_1.95-4.6   stringi_0.4-1   
## [13] stringr_1.0.0    tools_3.1.2      whisker_0.3-2    XML_3.98-1.2