depthStruct {ontoTools}R Documentation

tools for manipulating depth concepts for rooted DAGs

Description

return a list of environments giving mapping from node name to rooted DAG depth and from depth to vector of names of nodes at that depth

Usage

depthStruct(rg)
ontoDepth(rg)
DMdepth(g, maxd)

Arguments

rg rg: instance of class rootedDAG
g rg: instance of class depth
maxd maxd: bound on depth to be measured

Value

depthStruct: a list of two environments (see examples).

Note

ontoDepth is the workhorse for depthStruct. DMdepth is a function that works on a plain graph, creating the 'daughter matrix' and computing depths.

Author(s)

Vince Carey <stvjc@channing.harvard.edu>

Examples

data(litOnto)
print(litOnto)
g1 <- new("rootedDAG", DAG=litOnto, root="A")
o1 <- new("ontology", name="demo", version="0.1",
        rDAG=g1)
print(ds <- depthStruct(g1))
ds$tag2depth("A")
ds$tag2depth("H")
ds$depth2tag(2)

[Package ontoTools version 1.6.0 Index]