Produce a data.frame with a set of naive terms mapped to all matching ontology ids and their formal terms

liberalMap(terms, onto, useAgrep = FALSE, ...)

Arguments

terms

character() vector, can use grep-compatible regular expressions

onto

an instance of ontologyIndex::ontology_index

useAgrep

logical(1) if TRUE, agrep will be used

...

passed to agrep if used

Value

a data.frame

Examples

cands = c("astrocyte$", "oligodendrocyte", "oligodendrocyte precursor",
   "neoplastic", "^neuron$", "^vascular", "badterm")
#co = ontoProc::getCellOnto()
co = getOnto("cellOnto", year_added="2023")
#> loading from cache
liberalMap(cands, co)
#>              input         ontoid
#> 1       astrocyte$     CL:0000127
#> 2       astrocyte$     CL:0002604
#> 3       astrocyte$     CL:0002626
#> 4       astrocyte$     CL:0002627
#> 5  oligodendrocyte     CL:0000128
#> 6  oligodendrocyte     CL:0002453
#> 7  oligodendrocyte     CL:2000025
#> 8  oligodendrocyte     CL:4023059
#> 9  oligodendrocyte     GO:0014003
#> 10 oligodendrocyte     GO:0022032
#> 11 oligodendrocyte     GO:0048709
#> 12 oligodendrocyte     GO:0048713
#> 13 oligodendrocyte     GO:0048714
#> 14 oligodendrocyte     GO:0048715
#> 15 oligodendrocyte     GO:0070444
#> 16 oligodendrocyte     GO:0070445
#> 17 oligodendrocyte     GO:0070446
#> 18 oligodendrocyte     GO:0070447
#> 19 oligodendrocyte     GO:0097252
#> 20 oligodendrocyte     GO:1900141
#> 21 oligodendrocyte     GO:1900142
#> 22 oligodendrocyte     GO:1900143
#> 25      neoplastic    CHEBI:35610
#> 26      neoplastic     CL:0001063
#> 27      neoplastic   PATO:0002011
#> 28      neoplastic   PATO:0002097
#> 29        ^neuron$     CL:0000540
#> 30       ^vascular     CL:0000359
#> 31       ^vascular     CL:0005022
#> 32       ^vascular     CL:4023051
#> 33       ^vascular     CL:4023056
#> 34       ^vascular     GO:0003018
#> 35       ^vascular     GO:0005172
#> 36       ^vascular     GO:0010232
#> 37       ^vascular     GO:0035886
#> 38       ^vascular     GO:0043184
#> 39       ^vascular     GO:0072360
#> 40       ^vascular     GO:0097084
#> 41       ^vascular     GO:0101023
#> 42       ^vascular     GO:1904738
#> 43       ^vascular     GO:1905288
#> 44       ^vascular     GO:1990874
#> 45       ^vascular   PR:000001971
#> 46       ^vascular   PR:000002112
#> 47       ^vascular   PR:000048096
#> 48       ^vascular      PR:P35918
#> 49       ^vascular      PR:P35968
#> 50       ^vascular UBERON:0005629
#> 51       ^vascular UBERON:0006965
#> 52       ^vascular UBERON:0007798
#> 53       ^vascular UBERON:0009536
#> 54       ^vascular UBERON:0009537
#> 55         badterm        badterm
#>                                                                                  term
#> 1                                                                           astrocyte
#> 2                                                               hippocampal astrocyte
#> 3                                                                  immature astrocyte
#> 4                                                                    mature astrocyte
#> 5                                                                     oligodendrocyte
#> 6                                                      oligodendrocyte precursor cell
#> 7                                                         spinal cord oligodendrocyte
#> 8                                 differentiation-committed oligodendrocyte precursor
#> 9                                                         oligodendrocyte development
#> 10                                       telencephalon oligodendrocyte cell migration
#> 11                                                    oligodendrocyte differentiation
#> 12                                      regulation of oligodendrocyte differentiation
#> 13                             positive regulation of oligodendrocyte differentiation
#> 14                             negative regulation of oligodendrocyte differentiation
#> 15                                           oligodendrocyte progenitor proliferation
#> 16                             regulation of oligodendrocyte progenitor proliferation
#> 17                    negative regulation of oligodendrocyte progenitor proliferation
#> 18                    positive regulation of oligodendrocyte progenitor proliferation
#> 19                                                  oligodendrocyte apoptotic process
#> 20                                    regulation of oligodendrocyte apoptotic process
#> 21                           negative regulation of oligodendrocyte apoptotic process
#> 22                           positive regulation of oligodendrocyte apoptotic process
#> 25                                                               antineoplastic agent
#> 26                                                                    neoplastic cell
#> 27                                                                         neoplastic
#> 28                                                              neoplastic, malignant
#> 29                                                                             neuron
#> 30                                             vascular associated smooth muscle cell
#> 31                                                           vascular lymphangioblast
#> 32                                                       vascular leptomeningeal cell
#> 33                                                vascular leptomeningeal cell (Mmus)
#> 34                                             vascular process in circulatory system
#> 35                                vascular endothelial growth factor receptor binding
#> 36                                                                 vascular transport
#> 37                             vascular associated smooth muscle cell differentiation
#> 38                              vascular endothelial growth factor receptor 2 binding
#> 39                                                          vascular cord development
#> 40                                 vascular associated smooth muscle cell development
#> 41                                            vascular endothelial cell proliferation
#> 42                                   vascular associated smooth muscle cell migration
#> 43                           vascular associated smooth muscle cell apoptotic process
#> 44                               vascular associated smooth muscle cell proliferation
#> 45                                        vascular endothelial growth factor receptor
#> 46                                      vascular endothelial growth factor receptor 2
#> 47 vascular endothelial growth factor receptor 2, signal peptide removed form (human)
#> 48                              vascular endothelial growth factor receptor 2 (mouse)
#> 49                              vascular endothelial growth factor receptor 2 (human)
#> 50                                                                    vascular plexus
#> 51                                                                      vascular cord
#> 52                                                                    vascular system
#> 53                                                      vascular element of left lung
#> 54                                                     vascular element of right lung
#> 55                                                                               <NA>