Skip to contents

Find median exon expression data.

  • Returns median exon read counts, in tissues, of a collapsed gene model.

  • Results may be filtered by dataset, gene or tissue, but at least one gene must be provided

By default, this service queries the latest GTEx release.

GTEx Portal API documentation

Usage

get_median_exon_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

# median exon expression values for CRP, filtered for whole blood
get_median_exon_expression(
  gencodeIds = "ENSG00000132693.12",
  tissueSiteDetailIds = "Whole_Blood"
)
#> 
#> ── Paging info ─────────────────────────────────────────────────────────────────
#>  numberOfPages = 1
#>  page = 0
#>  maxItemsPerPage = 250
#>  totalNumberOfItems = 2
#> # A tibble: 2 × 8
#>   median exonId     tissueSiteDetailId ontologyId datasetId gencodeId geneSymbol
#>    <dbl> <chr>      <chr>              <chr>      <chr>     <chr>     <chr>     
#> 1      0 ENSG00000… Whole_Blood        UBERON:00… gtex_v8   ENSG0000… CRP       
#> 2      5 ENSG00000… Whole_Blood        UBERON:00… gtex_v8   ENSG0000… CRP       
#> # ℹ 1 more variable: unit <chr>