drawPath creates a data.frame with the metadata on each step in the
selected path, including its origin, version and url. This can be used to
complement analysis results and ensure reproducibility.
drawPath(graph, ...)
# S4 method for class 'igraph'
drawPath(graph, by, k = 1, include = NULL, exclude = NULL, res.name = NULL)An igraph object.
Unused.
A formula specifying the path to plot. (Default: NULL)
Numeric scalar. The kth shortest path to plot.
(Default: 1)
Character vector. Nodes to cross in the path.
(Default: NULL)
Character vector. Nodes to avoid in the path.
(Default: NULL)
Character vector. Names of resources to include in
the graph. (Default: NULL)
A data.frame with path steps in the rows and step metadata in the columns.
# Retrieve resource graph
graph <- ariadne()
# Draw fourth path from ko to ec
df <- drawPath(graph, ko ~ ec, k = 4)
# View path metadata
df
#> from to source version
#> 1 ko uniref90 ChocoPhlAn v201901b
#> 2 uniref90 ec ChocoPhlAn v201901b
#> url
#> 1 https://zenodo.org/records/17100034/files/map_ko_uniref90.txt.gz
#> 2 https://zenodo.org/records/17100034/files/map_level4ec_uniref90.txt.gz