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.1.2) has been loaded into the working environment (at 2018-01-19 12:35:02)
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