# PDB server connection required - testing excluded
require(igraph)
##-- Build a CNA object
pdb <- read.pdb("4Q21")
modes <- nma(pdb)
cij <- dccm(modes)
net <- cna(cij, cutoff.cij=0.2)
# Plot coarse grain network based on dynamically coupled communities
xy <- plot.cna(net)
#plot.dccm(cij, margin.segments=net$communities$membership)
# Chose a different PDB informed layout for plot
plot.cna(net, pdb)
# Play with plot layout and colors...
plot.cna(net, layout=layout.mds(net$community.network), col=c("blue","green") )
## Not run:
# # Plot full residue network colored by communities - will be slow due to number of edges!!
# plot.cna(net, pdb, full=TRUE)
#
# # Alter plot settings
# plot.cna(net, pdb, full=TRUE, vertex.size=3, weights=1, vertex.label=NA)
# ## End(Not run)
Run the code above in your browser using DataLab