Determines the levels of a Directed Acyclic Graph (DAG) {topGO}R Documentation

Utility functions for Directed Acyclic Graphs (DAG)

Description

Determines the levels of a Directed Acyclic Graph (DAG)

TODO: This function take the a directed graph and constructs a named vector which contain the level on which a node is. The root has level 1.

TODO: Find the root(roots) of the DAG

TODO: Simple function to invert the direction of edges in an directed graph. The returned graph is of class graphNEL. It can use either simple matrices or sparse matrices (SparseM library)

Usage

buildLevels(dag, root = NULL, leafs2root = TRUE)
getNoOfLevels(graphLevels)
getGraphRoot(dag, leafs2root = TRUE)
reverseArch(dirGraph, useAlgo = "sparse", useWeights = TRUE)

Arguments

dag ~~Describe dag here~~
root ~~Describe root here~~
leafs2root The leafs2root parameter tell if the graph has edges directed from the leaves to the root, or vice-versa
graphLevels ~~Describe graphLevels here~~
dirGraph The graph to be transformed
useAlgo "sparse" or "normal"
useWeights If weights should be used (if useAlgo = 'normal' that the weigths are used anyway)

Details

.....

Value

it returns a list containing:

level2nodes Environment where the key is the level number with the value being the nodes on that level.
nodes2level Environment where the key is the node label (the GO ID) and the value is the level on which that node lies.
noOfLevels The number of levels
noOfNodes The number of nodes


An object of class graphNEL-class is returned.

Author(s)

Adrian Alexa

See Also

topGOdata-class, inducedGraph

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.


[Package topGO version 1.12.0 Index]