get_single_nucleus_gex: Get Single Nucleus Gex

View source: R/get_single_nucleus_gex.R

get_single_nucleus_gexR Documentation

Get Single Nucleus Gex

Description

Retrieve Single Nucleus Gene Expression Data for a given Gene.

GTEx Portal API documentation

Usage

get_single_nucleus_gex(
  gencodeIds,
  datasetId = "gtex_snrnaseq_pilot",
  tissueSiteDetailIds = NULL,
  excludeDataArray = TRUE,
  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.

excludeDataArray

String. Options are TRUE or FALSE

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.

See Also

Other Expression Data Endpoints: get_clustered_median_exon_expression(), get_clustered_median_gene_expression(), get_clustered_median_junction_expression(), get_clustered_median_transcript_expression(), get_expression_pca(), get_gene_expression(), get_median_exon_expression(), get_median_gene_expression(), get_median_junction_expression(), get_median_transcript_expression(), get_single_nucleus_gex_summary(), get_top_expressed_genes()

Examples

## Not run: 
# Search for one or more genes - returns a tibble with one row per tissue.
# Column "cellTypes" now contains a tibble of expression summary data, with
# one row for each cell type
get_single_nucleus_gex(gencodeIds = c(
  "ENSG00000203782.5",
  "ENSG00000132693.12"
))

# `excludeDataArray = FALSE` - expression values are stored under "celltypes"
# in an additional column called "data"
response <- get_single_nucleus_gex(
  gencodeIds = "ENSG00000132693.12",
  excludeDataArray = FALSE,
  itemsPerPage = 2
)

response

# "cellTypes" contains a tibble of data with one row for each
# cell type e.g. for Breast_Mammary_Tissue
response$cellTypes[[2]]

# when `excludeDataArray = FALSE`, expression values are stored in "data"
# e.g. for Breast_Mammary_Tissue, Epithelial cell (luminal):
response$cellTypes[[2]]$data[[1]]

## End(Not run)

gtexr documentation built on June 8, 2025, 10:26 a.m.