Skip to contents

Find median transcript expression data of all known transcripts of a gene.

  • Returns median normalized expression in tissues of all known transcripts of a given gene.

  • Results may be filtered by dataset or tissue.

By default, this service queries the latest GTEx release.

GTEx Portal API documentation

Usage

get_median_transcript_expression(
  gencodeIds,
  datasetId = "gtex_v8",
  tissueSiteDetailIds = NULL,
  page = 0,
  itemsPerPage = getOption("gtexr.itemsPerPage"),
  .verbose = getOption("gtexr.verbose"),
  .return_raw = FALSE
)

Arguments

gencodeIds

A character vector of Versioned GENCODE IDs, e.g. c("ENSG00000132693.12", "ENSG00000203782.5").

datasetId

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

tissueSiteDetailIds

Character vector of IDs for tissues of interest. Can be GTEx specific IDs (e.g. "Whole_Blood"; use get_tissue_site_detail() to see valid values) or Ontology IDs.

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.

Examples

get_median_transcript_expression(gencodeIds = "ENSG00000132693.12")
#> Warning: ! Total number of items (378) exceeds the selected maximum page size (250).
#>  128 items were not retrieved.
#>  To retrieve all available items, increase `itemsPerPage`, ensuring you reuse
#>   your original query parameters e.g.
#>   `get_median_transcript_expression(<your_existing_parameters>, itemsPerPage =
#>   100000)`
#>  Alternatively, adjust global "gtexr.itemsPerPage" setting e.g.
#>   `options(list(gtexr.itemsPerPage = 100000))`
#> 
#> ── Paging info ─────────────────────────────────────────────────────────────────
#>  numberOfPages = 2
#>  page = 0
#>  maxItemsPerPage = 250
#>  totalNumberOfItems = 378
#> # A tibble: 250 × 8
#>    median transcriptId      tissueSiteDetailId    ontologyId datasetId gencodeId
#>     <dbl> <chr>             <chr>                 <chr>      <chr>     <chr>    
#>  1 0.130  ENST00000255030.9 Adipose_Subcutaneous  UBERON:00… gtex_v8   ENSG0000…
#>  2 0      ENST00000368110.1 Adipose_Subcutaneous  UBERON:00… gtex_v8   ENSG0000…
#>  3 0      ENST00000368111.5 Adipose_Subcutaneous  UBERON:00… gtex_v8   ENSG0000…
#>  4 0      ENST00000368112.5 Adipose_Subcutaneous  UBERON:00… gtex_v8   ENSG0000…
#>  5 0      ENST00000437342.1 Adipose_Subcutaneous  UBERON:00… gtex_v8   ENSG0000…
#>  6 0.0100 ENST00000473196.1 Adipose_Subcutaneous  UBERON:00… gtex_v8   ENSG0000…
#>  7 0      ENST00000489317.1 Adipose_Subcutaneous  UBERON:00… gtex_v8   ENSG0000…
#>  8 0.0900 ENST00000255030.9 Adipose_Visceral_Ome… UBERON:00… gtex_v8   ENSG0000…
#>  9 0      ENST00000368110.1 Adipose_Visceral_Ome… UBERON:00… gtex_v8   ENSG0000…
#> 10 0      ENST00000368111.5 Adipose_Visceral_Ome… UBERON:00… gtex_v8   ENSG0000…
#> # ℹ 240 more rows
#> # ℹ 2 more variables: geneSymbol <chr>, unit <chr>