Function to find the root node of a direct acyclic graph (DAG)

Description

dDAGroot is supposed to find the root node of a direct acyclic graph (DAG; an ontology). It return the name (i.e Term ID) of the root node.

Usage

dDAGroot(g)

Arguments

g
an object of class "igraph" or "graphNEL"

Value

  • root: the root name (i.e. Term ID)

Note

none

Examples

# 1) load HPPA as igraph object ig.HPPA <-dRDataLoader(RData='ig.HPPA')
'ig.HPPA' (from package 'dnet' version 1.0.11) has been loaded into the working environment (at 2017-03-27 19:54:17)
g <- ig.HPPA # 2) find the root root <- dDAGroot(g) root
[1] "HP:0000118"

Source code

dDAGroot.r

Source man

dDAGroot.Rd dDAGroot.pdf

See also

dDAGroot