
Pre-process data for subsequent ontology similarity
pre_process_sim_onto.RdThis function calculates needed information for semantic similiary calculations
Arguments
- object
OntologySim class. SeeOntologySim().- .verbose
Boolean. Controls verbosity of the function.
Examples
# ancestors, descendants and information content added to the class
onto <- data.table::data.table(
parent = c("a", "b", "b", "b", "c"),
child = c("b", "c", "d", "e", "f"),
type = c("part_of", "part_of", "part_of", "is_a", "is_a")
)
onto_obj <- OntologySim(onto, .verbose = FALSE)
onto_obj <- pre_process_sim_onto(onto_obj, .verbose = FALSE)
names(S7::prop(onto_obj, "outputs"))
#> [1] "ancestors" "descendants" "information_content"