graph2paths: produce list of vectors of (shortest) paths from root to all...

View source: R/autism_details.R

graph2pathsR Documentation

produce list of vectors of (shortest) paths from root to all nodes in gr

Description

produce list of vectors of (shortest) paths from root to all nodes in gr

Usage

graph2paths(gr, root = "http://www.ifomis.org/bfo/1.1#Entity", excise = NULL)

Arguments

gr

graphNEL (package graph) instance representing an ontology

root

character(1) node from which to produce paths

excise

character() or NULL, path steps to exclude

Examples

if (!requireNamespace("graph")) stop("install graph package from Bioconductor to use this function")
jpath = system.file("json", "aut.json.gz", package="ontoProc")
cg = jowl2classgraph(jpath,
  dropstrings = "http://purl.org/autism-ontology/1.0/autism-rules.owl#")
evec = grep("span\\#|snap\\#", graph::nodes(cg), value=TRUE)
paths = graph2paths(cg, excise=evec)
tail(paths)

vjcitn/ontoProc documentation built on July 5, 2025, 6:31 a.m.