Acquires parent terms of a given URI based on ontologies loaded into Gemma. Propagated relations are subClassOf and has_part

get_annotation_parents(
  uri,
  raw = getOption("gemma.raw", FALSE),
  memoised = getOption("gemma.memoised", FALSE),
  file = getOption("gemma.file", NA_character_),
  overwrite = getOption("gemma.overwrite", FALSE)
)

Arguments

uri

Term URI

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

get_annotation_parents("http://purl.obolibrary.org/obo/MONDO_0000408")
#>     category.name category.URI                              value.name
#>            <char>       <char>                                  <char>
#>  1:          <NA>         <NA>                           human disease
#>  2:          <NA>         <NA>         alcohol-induced mental disorder
#>  3:          <NA>         <NA>         central nervous system disorder
#>  4:          <NA>         <NA>          mental or behavioural disorder
#>  5:          <NA>         <NA>                                 disease
#>  6:          <NA>         <NA>                    psychiatric disorder
#>  7:          <NA>         <NA> developmental disorder of mental health
#>  8:          <NA>         <NA>                 nervous system disorder
#>  9:          <NA>         <NA>                  nervous system disease
#> 10:          <NA>         <NA>               alcohol-related disorders
#> 11:          <NA>         <NA>               alcohol-induced disorders
#> 12:          <NA>         <NA> developmental disorder of mental health
#> 13:          <NA>         <NA>              substance-related disorder
#> 14:          <NA>         <NA>                           brain disease
#> 15:          <NA>         <NA>                          brain disorder
#> 16:          <NA>         <NA>         specific developmental disorder
#> 17:          <NA>         <NA>                     experimental factor
#> 18:          <NA>         <NA>                         mental disorder
#> 19:          <NA>         <NA>          central nervous system disease
#> 20:          <NA>         <NA>                                 disease
#>     category.name category.URI                              value.name
#>            <char>       <char>                                  <char>
#>                                        value.URI
#>                                           <char>
#>  1: http://purl.obolibrary.org/obo/MONDO_0700096
#>  2: http://purl.obolibrary.org/obo/MONDO_0002326
#>  3: http://purl.obolibrary.org/obo/MONDO_0002602
#>  4:         http://www.ebi.ac.uk/efo/EFO_0000677
#>  5: http://purl.obolibrary.org/obo/MONDO_0000001
#>  6: http://purl.obolibrary.org/obo/MONDO_0002025
#>  7:         http://www.ebi.ac.uk/efo/EFO_0005548
#>  8: http://purl.obolibrary.org/obo/MONDO_0005071
#>  9:         http://www.ebi.ac.uk/efo/EFO_0000618
#> 10: http://purl.obolibrary.org/obo/MONDO_0021698
#> 11: http://purl.obolibrary.org/obo/MONDO_0021699
#> 12: http://purl.obolibrary.org/obo/MONDO_0005503
#> 13: http://purl.obolibrary.org/obo/MONDO_0002494
#> 14:         http://www.ebi.ac.uk/efo/EFO_0005774
#> 15: http://purl.obolibrary.org/obo/MONDO_0005560
#> 16: http://purl.obolibrary.org/obo/MONDO_0000592
#> 17:         http://www.ebi.ac.uk/efo/EFO_0000001
#> 18: http://purl.obolibrary.org/obo/MONDO_0005084
#> 19:         http://www.ebi.ac.uk/efo/EFO_0009386
#> 20:         http://www.ebi.ac.uk/efo/EFO_0000408
#>                                        value.URI
#>                                           <char>