Search for annotation tags

search_annotations(
  query,
  raw = getOption("gemma.raw", FALSE),
  memoised = getOption("gemma.memoised", FALSE),
  file = getOption("gemma.file", NA_character_),
  overwrite = getOption("gemma.overwrite", FALSE)
)

Arguments

query

The search query. Queries can include plain text or ontology terms They also support conjunctions ("alpha AND beta"), disjunctions ("alpha OR beta") grouping ("(alpha OR beta) AND gamma"), prefixing ("alpha*"), wildcard characters ("BRCA?") and fuzzy matches ("alpha~").

raw

TRUE to receive results as-is from Gemma, or FALSE to enable parsing. Raw results usually contain additional fields and flags that are omitted in the parsed results.

memoised

Whether or not to save to cache for future calls with the same inputs and use the result saved in cache if a result is already saved. Doing options(gemma.memoised = TRUE) will ensure that the cache is always used. Use forget_gemma_memoised to clear the cache.

file

The name of a file to save the results to, or NULL to not write results to a file. If raw == TRUE, the output will be the raw endpoint from the API, likely a JSON or a gzip file. Otherwise, it will be a RDS file.

overwrite

Whether or not to overwrite if a file exists at the specified filename.

Value

A data table with annotations (annotation search result value objects) matching the given identifiers. A list if raw = TRUE. A 400 error if required parameters are missing.

The fields of the output data.table are:

  • category.name: Category that the annotation belongs to

  • category.URI: URI for the category.name

  • value.name: Annotation term

  • value.URI: URI for the value.name

Examples

search_annotations("traumatic")
#>     category.name category.URI
#>            <char>       <char>
#>  1:          <NA>         <NA>
#>  2:          <NA>         <NA>
#>  3:          <NA>         <NA>
#>  4:          <NA>         <NA>
#>  5:          <NA>         <NA>
#>  6:          <NA>         <NA>
#>  7:          <NA>         <NA>
#>  8:          <NA>         <NA>
#>  9:          <NA>         <NA>
#> 10:          <NA>         <NA>
#> 11:          <NA>         <NA>
#> 12:          <NA>         <NA>
#> 13:          <NA>         <NA>
#> 14:          <NA>         <NA>
#> 15:          <NA>         <NA>
#> 16:          <NA>         <NA>
#> 17:          <NA>         <NA>
#> 18:          <NA>         <NA>
#> 19:          <NA>         <NA>
#> 20:          <NA>         <NA>
#> 21:          <NA>         <NA>
#> 22:          <NA>         <NA>
#> 23:          <NA>         <NA>
#> 24:          <NA>         <NA>
#> 25:          <NA>         <NA>
#> 26:          <NA>         <NA>
#> 27:          <NA>         <NA>
#> 28:          <NA>         <NA>
#> 29:          <NA>         <NA>
#> 30:          <NA>         <NA>
#> 31:          <NA>         <NA>
#> 32:          <NA>         <NA>
#> 33:          <NA>         <NA>
#> 34:          <NA>         <NA>
#> 35:          <NA>         <NA>
#> 36:          <NA>         <NA>
#> 37:          <NA>         <NA>
#> 38:          <NA>         <NA>
#> 39:          <NA>         <NA>
#> 40:          <NA>         <NA>
#> 41:          <NA>         <NA>
#> 42:          <NA>         <NA>
#> 43:          <NA>         <NA>
#> 44:          <NA>         <NA>
#>     category.name category.URI
#>                                               value.name
#>                                                   <char>
#>  1:                                       traumatic acid
#>  2:                       traumatic diaphragmatic hernia
#>  3:                                   traumatic glaucoma
#>  4:                               traumatic brain injury
#>  5:                         traumatic avascular necrosis
#>  6:                        traumatic myositis ossificans
#>  7:                             traumatic encephalopathy
#>  8: avoidance of stimuli associated with traumatic event
#>  9:   post-traumatic stress disorder symptom measurement
#> 10:                     brain stem hemorrhage, traumatic
#> 11:                       post-traumatic stress disorder
#> 12:           secondary non-traumatic avascular necrosis
#> 13:                              post-traumatic epilepsy
#> 14:         iatrogenic or traumatic pituitary deficiency
#> 15:                       post-traumatic stress disorder
#> 16:                                             epilepsy
#> 17:                                       cerebral edema
#> 18:                                  pseudobulbar affect
#> 19:                                   cerebral contusion
#> 20:                                   perirenal hematoma
#> 21:                       neuropathic spinal arthropathy
#> 22:                                  concave nasal ridge
#> 23:                                    pneumomediastinum
#> 24:                                  widened mediastinum
#> 25:                     cerebrospinal fluid erythrocytes
#> 26:                                           concussion
#> 27:                                   spinal cord injury
#> 28:                                       crush syndrome
#> 29:                                              neuroma
#> 30:                                               injury
#> 31:                                 kluver-bucy syndrome
#> 32:                                   spinal cord injury
#> 33:                                acute stress reaction
#> 34:                                         osteoporosis
#> 35:                          response to trauma exposure
#> 36:                       cerebrospinal fluid rhinorrhea
#> 37:                                               injury
#> 38:                                 kluver-bucy syndrome
#> 39:                                        wound myiasis
#> 40:                                 dementia pugilistica
#> 41:                                              neuroma
#> 42:                                acute stress disorder
#> 43:                             cerebrospinal fluid leak
#> 44:                                      kummell disease
#>                                               value.name
#>                                        value.URI
#>                                           <char>
#>  1:  http://purl.obolibrary.org/obo/CHEBI_545687
#>  2:         http://www.ebi.ac.uk/efo/EFO_1001861
#>  3: http://purl.obolibrary.org/obo/MONDO_0001626
#>  4: http://purl.obolibrary.org/obo/MONDO_0858950
#>  5: http://purl.obolibrary.org/obo/MONDO_0018375
#>  6: http://purl.obolibrary.org/obo/MONDO_0021929
#>  7: http://purl.obolibrary.org/obo/MONDO_0043512
#>  8:    http://purl.obolibrary.org/obo/HP_0032942
#>  9:         http://www.ebi.ac.uk/efo/EFO_0008535
#> 10:         http://www.ebi.ac.uk/efo/EFO_1001276
#> 11:         http://www.ebi.ac.uk/efo/EFO_0001358
#> 12: http://purl.obolibrary.org/obo/MONDO_0018376
#> 13: http://purl.obolibrary.org/obo/MONDO_0043264
#> 14: http://purl.obolibrary.org/obo/MONDO_0019845
#> 15: http://purl.obolibrary.org/obo/MONDO_0005146
#> 16:         http://www.ebi.ac.uk/efo/EFO_0000474
#> 17:    http://purl.obolibrary.org/obo/HP_0002181
#> 18:    http://purl.obolibrary.org/obo/HP_0002193
#> 19:    http://purl.obolibrary.org/obo/HP_6000141
#> 20:    http://purl.obolibrary.org/obo/HP_0030171
#> 21:    http://purl.obolibrary.org/obo/HP_0008443
#> 22:    http://purl.obolibrary.org/obo/HP_0011120
#> 23:    http://purl.obolibrary.org/obo/HP_0025421
#> 24:    http://purl.obolibrary.org/obo/HP_0034501
#> 25:    http://purl.obolibrary.org/obo/HP_6000202
#> 26:         http://www.ebi.ac.uk/efo/EFO_0011023
#> 27: http://purl.obolibrary.org/obo/MONDO_0043797
#> 28:         http://www.ebi.ac.uk/efo/EFO_1001299
#> 29:         http://www.ebi.ac.uk/efo/EFO_0009619
#> 30:         http://www.ebi.ac.uk/efo/EFO_0000546
#> 31:         http://www.ebi.ac.uk/efo/EFO_0007335
#> 32:         http://www.ebi.ac.uk/efo/EFO_1001919
#> 33:         http://www.ebi.ac.uk/efo/EFO_0005223
#> 34:         http://www.ebi.ac.uk/efo/EFO_0003882
#> 35:         http://www.ebi.ac.uk/efo/EFO_0008483
#> 36: http://purl.obolibrary.org/obo/MONDO_0020773
#> 37: http://purl.obolibrary.org/obo/MONDO_0021178
#> 38: http://purl.obolibrary.org/obo/MONDO_0005817
#> 39: http://purl.obolibrary.org/obo/MONDO_0015622
#> 40: http://purl.obolibrary.org/obo/MONDO_0019976
#> 41: http://purl.obolibrary.org/obo/MONDO_0002173
#> 42: http://purl.obolibrary.org/obo/MONDO_0003763
#> 43: http://purl.obolibrary.org/obo/MONDO_0043327
#> 44: http://purl.obolibrary.org/obo/MONDO_0003940
#>                                        value.URI