# NOT RUN {
# PDB server connection required - testing excluded
if (!requireNamespace("igraph", quietly = TRUE)) {
message('Need igraph installed to run this example')
} else {
##-- Build a CNA object
pdb <- read.pdb("4Q21")
modes <- nma(pdb)
cij <- dccm(modes)
net <- cna(cij, cutoff.cij=0.2)
##-- Community membership vector for each clustering step
tree <- community.tree(net, rescale=TRUE)
## Produce a new k=7 membership vector and CNA network
memb.k7 <- tree$tree[ tree$num.of.comms == 7, ]
net.7 <- network.amendment(net, memb.k7)
plot(net.7, pdb)
print(net)
print(net.7)
}
# }
Run the code above in your browser using DataLab