annot_all_chars: Annotate all character statements with ontology terms

Description Usage Arguments Value Examples

View source: R/Ontology_operations_main.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#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)

ontoFAST documentation built on April 29, 2021, 9:06 a.m.