mapOneNaive: use grep or agrep to find a match for a naive token into...

View source: R/mapNaive.R

mapOneNaiveR Documentation

use grep or agrep to find a match for a naive token into ontology

Description

use grep or agrep to find a match for a naive token into ontology

Usage

mapOneNaive(naive, onto, useAgrep = FALSE, ...)

Arguments

naive

character(1)

onto

an instance of ontologyIndex::ontology_index

useAgrep

logical(1) if TRUE, agrep will be used

...

passed to agrep if used

Value

if a match is found, the result of grep/agrep with value=TRUE is returned; otherwise a named NA_character_ is returned

named vector, names are ontology identifiers, values are matched strings

Examples

#co = ontoProc::getCellOnto()
co = getOnto("cellOnto", year_added="2023")
mapOneNaive("astrocyte", co)

vjcitn/ontoProc documentation built on Nov. 22, 2024, 6:11 p.m.