join_vars_to_ontol: Join Mapping Table to Ontology Network Graph
Description
This function creates new nodes representing dataset variables and joins them
to an input ontology network using a mapping file. Prior to joining, the
information content of all nodes is calculated using node_IC_zhou.
Usage
join_vars_to_ontol(ontol_graph, var2entity_tbl, mode = "in", root, k = 0.5)
Value
A tidygraph resulting from the joining of var2entity_tbl
and ontol_graph.
Arguments
ontol_graph
Graph containing the chosen ontology. Must be in
tidygraph format or coercible to this format.
var2entity_tbl
Edge table containing dataset variable names in first
column and entities in ontologies to which they are mapped in the second
column.
mode
Character constant specifying the directionality of the edges.
One of "in" or "out".
root
name of root node identifier in column 1 to calculate node depth
from.
k
numeric value to adjust the weight of the two items of information
content equation (relative number of hyponyms/descendants and relative node
depth). Default = 0.5
Details
The user-defined mappings between variables in a dataset and
entities/terms in an ontology are provided in an edge table
(var2entity_tbl).
A node attribute column, node_category is
generated to describe if a node is one of "Dataset Variable", "Annotation", or
"Annotation Ancestor".
See Also
node_IC_zhou
Other semantic enrichment functions:
metavariable_agg(),
metavariable_info(),
metavariable_variable_descendants()