join_vars_to_ontol {eHDPrep}R Documentation

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)

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

Value

A tidygraph resulting from the joining of var2entity_tbl and ontol_graph.

See Also

node_IC_zhou

Other semantic enrichment functions: metavariable_agg(), metavariable_info(), metavariable_variable_descendants()

Examples

data(example_ontology)
join_vars_to_ontol(example_ontology, example_mapping_file, root = "root", mode = "in")

[Package eHDPrep version 1.3.3 Index]