annot_all_chars: Annotate all character statements with ontology terms

View source: R/Ontology_operations_main.R

annot_all_charsR Documentation

Annotate all character statements with ontology terms

Description

Matches character statement and returns most similar ontology terms using grep and distance-based matching

Usage

annot_all_chars(ontology, use.synonyms = TRUE, min_set = TRUE)

Arguments

ontology

ontology_index object with character names (ontology$name_characters) and ids (ontology$id_characters)

use.synonyms

using synonyms list during search. It has to be included in ontology, see syn_extract()

min_set

if TRUE eliminates higher order inferred ontology terms

Value

The list of matched ontology terms and their character ids.

Examples

#getting ontology
data(HAO)
data(Sharkey_2011)
ontology<-HAO
#parsing synonyms
ontology$parsed_synonyms<-syn_extract(HAO)
# reading in characters
char_et_states<-Sharkey_2011
# embedding characters and character ids into ontology
id_characters<-paste("CHAR:",c(1:392), sep="")
name_characters<-char_et_states[,1]
names(name_characters)<-id_characters
ontology$name_characters<-name_characters
ontology$id_characters<-id_characters
# running annotations

auto_annotations<-annot_all_chars(ontology)


sergeitarasov/ontoFAST documentation built on Aug. 5, 2022, 4:20 a.m.