# NOT RUN {
# Needs MUSCLE installed - testing excluded
if(check.utility("muscle")) {
## Fetch PDB files and split to chain A only PDB files
ids <- c("1a70_A", "1czp_A", "1frd_A", "1fxi_A", "1iue_A", "1pfd_A")
files <- get.pdb(ids, split = TRUE, path = tempdir())
## Sequence Alignement
pdbs <- pdbaln(files, outfile = tempfile())
## Normal mode analysis on aligned data
modes <- nma(pdbs, rm.gaps=FALSE)
## Plot fluctuation data
plot(modes, pdbs=pdbs)
## Cluster on Fluctuation similariy
sip <- sip(modes)
hc <- hclust(dist(sip))
col <- cutree(hc, k=3)
## Plot fluctuation data
plot(modes, pdbs=pdbs, col=col)
## Remove gaps from output
modes <- nma(pdbs, rm.gaps=TRUE)
## RMSIP is pre-calculated
heatmap(1-modes$rmsip)
## Bhattacharyya coefficient
bc <- bhattacharyya(modes)
heatmap(1-bc)
}
# }
Run the code above in your browser using DataLab