## Not run:
# ## load transducin example data
# attach(transducin)
#
# ## remove flexible termina for a full-length NMA calculation
# inds = 30:(ncol(pdbs$ali)-8)
# npdbs = trim(pdbs, col.inds = inds)
# gaps.res = gap.inspect(npdbs$ali)
#
# ## reference PDB for secondary structure annotation
# ref.pdb_id = substr(npdbs$id[1], 1, 4)
# ref.chain_id = substr(npdbs$id[1], 6, 6)
# ref.resno = npdbs$resno[1, !is.na(npdbs$resno[1, ])]
# pdb = read.pdb(ref.pdb_id)
# pdb = trim(pdb, resno=ref.resno, chain=ref.chain_id)
#
# ## eNMA calculation and obtain modes of motion including atomic fluctuations
# modes <- nma(npdbs, rm.gaps=FALSE, full=FALSE, ncore=NULL)
# x = modes$fluctuation
#
# ## simple line plot with SSE annotation
# plot.fluct(x, sse = pdb, resno = pdb)
#
# ## group data by specifying colors of each fluctuation line; same color indicates
# ## same group. Also do significance calculation and annotation
# col = annotation[, "color"]
# col[annotation[, "state3"] == "GDI"] = "blue"
# plot.fluct(x, col=col, signif = TRUE, sse = pdb, resno = pdb)
#
# ## show only line of mean values for each group. Gapped positions are removed. Nicer
# ## plot with area shaded for the first group.
# plot.fluct(x, col=col, signif = TRUE, sse = pdb, resno = pdb, mean=TRUE, polygon=TRUE, rm.gaps=TRUE)
#
# detach(transducin)
# ## End(Not run)
Run the code above in your browser using DataLab