Skip to contents

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")
#> loading from cache
mapOneNaive("astrocyte", co)
#>                                         CL:0000127 
#>                                        "astrocyte" 
#>                                         CL:0002603 
#>                      "astrocyte of the cerebellum" 
#>                                         CL:0002604 
#>                            "hippocampal astrocyte" 
#>                                         CL:0002605 
#>                 "astrocyte of the cerebral cortex" 
#>                                         CL:0002606 
#>                     "astrocyte of the spinal cord" 
#>                                         CL:0002626 
#>                               "immature astrocyte" 
#>                                         CL:0002627 
#>                                 "mature astrocyte" 
#>                                         CL:0012000 
#>                       "astrocyte of the forebrain" 
#>                                         GO:0002265 
#> "astrocyte activation involved in immune response" 
#>                                         GO:0014002 
#>                            "astrocyte development" 
#>                                         GO:0021896 
#>              "forebrain astrocyte differentiation" 
#>                                         GO:0021897 
#>                  "forebrain astrocyte development" 
#>                                         GO:0022031 
#>           "telencephalon astrocyte cell migration" 
#>                                         GO:0035700 
#>                             "astrocyte chemotaxis" 
#>                                         GO:0036520 
#>          "astrocyte-dopaminergic neuron signaling" 
#>                                         GO:0043615 
#>                         "astrocyte cell migration" 
#>                                         GO:0048143 
#>                             "astrocyte activation" 
#>                                         GO:0048708 
#>                        "astrocyte differentiation" 
#>                                         GO:0048710 
#>          "regulation of astrocyte differentiation" 
#>                                         GO:0048711 
#> "positive regulation of astrocyte differentiation" 
#>                                         GO:0048712 
#> "negative regulation of astrocyte differentiation" 
#>                                         GO:0061888 
#>               "regulation of astrocyte activation" 
#>                                         GO:0061889 
#>      "negative regulation of astrocyte activation" 
#>                                         GO:0061890 
#>      "positive regulation of astrocyte activation" 
#>                                         GO:0097449 
#>                             "astrocyte projection" 
#>                                         GO:2000458 
#>               "regulation of astrocyte chemotaxis" 
#>                                         GO:2000459 
#>      "negative regulation of astrocyte chemotaxis" 
#>                                         GO:2000464 
#>      "positive regulation of astrocyte chemotaxis"