Skip to contents

This service returns the list of annotations and allowed values by which a particular dataset can be subsetted. Results may be filtered by dataset.

GTEx Portal API documentation

Usage

get_annotation(
  datasetId = "gtex_v8",
  page = 0,
  itemsPerPage = getOption("gtexr.itemsPerPage"),
  .verbose = getOption("gtexr.verbose"),
  .return_raw = FALSE
)

Arguments

datasetId

String. Unique identifier of a dataset. Usually includes a data source and data release. Options: "gtex_v8", "gtex_snrnaseq_pilot".

page

Integer (default = 0).

itemsPerPage

Integer (default = 250). Set globally to maximum value 100000 with options(list(gtexr.itemsPerPage = 100000)).

.verbose

Logical. If TRUE (default), print paging information. Set to FALSE globally with options(list(gtexr.verbose = FALSE)).

.return_raw

Logical. If TRUE, return the raw API JSON response. Default = FALSE

Value

A tibble. Or a list if .return_raw = TRUE.

Details

Note: the output for this function appears to be incomplete currently.

Examples

get_annotation()
#> 
#> ── Paging info ─────────────────────────────────────────────────────────────────
#>  numberOfPages = 1
#>  page = 0
#>  maxItemsPerPage = 250
#>  totalNumberOfItems = 2
#> # A tibble: 2 × 5
#>   entity  values    type  annotation datasetId
#>   <chr>   <list>    <chr> <chr>      <chr>    
#> 1 subject <chr [2]> enum  sex        gtex_v8  
#> 2 subject <chr [6]> enum  ageBracket gtex_v8