buildLevels(dag, root = NULL, leafs2root = TRUE)
getNoOfLevels(graphLevels)
getGraphRoot(dag, leafs2root = TRUE)
reverseArch(dirGraph, useAlgo = "sparse", useWeights = TRUE)
graphNEL
object.buildLevels
function.graphNEL
object containing a directed graph.c("sparse", "normal")
. By default, useAlgo = "sparse"
, a sparce matrix object is
used to transpose the adjacency matrix. Otherwise a standard R
martix is used.useAlgo =
"normal"
then the weigths are used anyway)buildLevels
returns a list containing:
graphNEL-class
is returned.buildLevels
function determines the levels of a Directed
Acyclic Graph (DAG). The level of a node is defined as the longest
path from the node to the root. The function take constructs a named
list containg varios information about each nodes level. The root has
level 1. getNoOfLevels
- a convenient function to extract the number of
levels from the object returned by buildLevels
getGraphRoot
finds the root(s) of the DAG
reverseArch
- simple function to invert the direction of edges
in a DAG. The returned graph is of class graphNEL. It can use either
simple matrices or sparse matrices (SparseM library)
topGOdata-class
,
inducedGraph
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
Run the code above in your browser using DataLab