GSAR (version 1.6.0)

HDP.ranking: High Directed Preorder Ranking of MST

Description

Rank nodes in an object of class igraph (see package igraph for the definition of class igraph) containing a minimum spanning tree (MST) according to the High Directed Preorder traversal of the tree.

Usage

HDP.ranking(mst)

Arguments

mst
object of class igraph containing the minimum spanning tree.

Value

of the MST.

Details

Rank nodes in an object of class igraph (see package igraph) containing a minimum spanning tree (MST). The MST is rooted at a node with the largest geodesic distance and the rest of the nodes are ranked according to the high directed preorder (HDP) traversal of the tree (Friedman and Rafsky 1979).

References

Rahmatallah Y., Emmert-Streib F. and Glazko G. (2012) Gene set analysis for self-contained tests: complex null and specific alternative hypotheses. Bioinformatics 28, 3073--3080.

Friedman J. and Rafsky L. (1979) Multivariate generalization of the Wald-Wolfowitz and Smirnov two-sample tests. Ann. Stat. 7, 697--717.

See Also

KStest.

Examples

Run this code
## generate random data using normal distribution
## generate 20 features in 20 samples
object <- matrix(rnorm(400),20,20)
objt <- aperm(object, c(2,1))
## calculate the weight matrix
Wmat <- as.matrix(dist(objt, method = "euclidean", diag = TRUE, upper = TRUE, p = 2))
## create a weighted undirectional graph from the weight matrix
gr <- graph.adjacency(Wmat, weighted = TRUE, mode = "undirected")
## find the minimum spanning tree
mst <- minimum.spanning.tree(gr)
ranks <- HDP.ranking(mst)
plot(mst)

Run the code above in your browser using DataLab