Knet
function and is included only for comparison.Compactness(g, nperm=100, dist.method=c("shortest.paths", "diffusion", "mfpt"),
vertex.attr="pheno", edge.attr="distance", correct.factor=1, D=NULL,
verbose=T)
igraph
object, the network to work on.1
. Smaller edge distances denote stronger interactions between vertex pairs.correct.factor
.g
output by the DistGraph
function. If NULL
, then D
is computed by the Compactness
function.TRUE
messages about the progress of the function are displayed.Compactness
is run on the single set of vertex weights and a list containing the statistics below is returned. If more than one vertex attribute is input, then Compactness
is run on each set of vertex weights and a list containing an element for each vertex attribute is returned. Each element contains a sub-list containing the statistics below for the relevant vertex attribute.NA
if no permutations are completed.NA
if no permutations are completed.Knet
function, albeit not as effective. The compactness score C
is defined as the mean shortest path distance between pairs of vertices in a set P
on network g
.
$$C(P) = \frac{2 \sum_{i,j \in P; i < j} d^g(i,j)}{|P| * (|P| - 1)}$$
The compactness score is only included within the SANTA
package to allow for comparisons to be made. Unlike the Knet
function, it cannot be applied to continuous distributions of vertex weights. It can also result in biases if there is large variability in density across the network.
The weight of a vertex should be 1 if it is a hit, 0 if it is not a hit or NA
if the information is missing. Vertices with missing weights are still included within the network but are excluded from the permuted sets.
Glaab, E., Baudot A., Krasnogor N. and Valencia A. (2010). Extending pathways and processes using molecular interaction networks to analyse cancer genome data. BMC Bioinformatics. 11(1): 597:607.