Amendment of a CNA Network According To A Input Community Membership Vector.

Usage

network.amendment(x, membership, minus.log=TRUE)

Arguments

x
A protein network graph object as obtained from the ‘cna’ function.
membership
A numeric vector containing the new community membership.
minus.log
Logical. Whether to use the minus.log on the cij values.

Description

This function changes the ‘communities’ attribute of a ‘cna’ class object to match a given membership vector.

Value

Returns a ‘cna’ class object with the attributes changed according to the membership vector provided.

Details

This function is useful, in combination with ‘community.tree’, for inspecting different community partitioning options of a input ‘cna’ object. See examples.

Examples

# PDB server connection required - testing excluded ##-- Build a CNA object pdb <- read.pdb("4Q21")
Note: Accessing on-line PDB file
modes <- nma(pdb)
Building Hessian... Done in 0.067 seconds. Diagonalizing Hessian... Done in 0.277 seconds.
cij <- dccm(modes)
|======================================================================| 100%
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)
Obtaining layout from PDB structure
print(net)

Call: cna.dccm(cij = cij, cutoff.cij = 0.2) Structure: - NETWORK NODES#: 168 EDGES#: 668 - COMMUNITY NODES#: 9 EDGES#: 19 + attr: network, communities, community.network, community.cij, cij, call
print(net.7)
Call: cna.dccm(cij = cij, cutoff.cij = 0.2) Structure: - NETWORK NODES#: 168 EDGES#: 668 - COMMUNITY NODES#: 7 EDGES#: 13 + attr: network, communities, community.network, community.cij, cij, call

See also

cna, community.tree, summary.cna

Author

Guido Scarabelli