get_clustered_median_transcript_expression: Get Clustered Median Transcript Expression

View source: R/get_clustered_median_transcript_expression.R

get_clustered_median_transcript_expressionR Documentation

Get Clustered Median Transcript Expression

Description

Find median transcript expression data of all known transcripts of a gene along with hierarchical clusters.

  • Returns median normalized expression in tissues of all known transcripts of a given gene along with the hierarchical clustering results of tissues and genes, based on expression, in Newick format.

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

  • The hierarchical clustering is performed by calculating Euclidean distances and using the average linkage method.

  • This endpoint is not paginated.

By default, this service queries the latest GTEx release.

GTEx Portal API documentation

Usage

get_clustered_median_transcript_expression(
  gencodeIds,
  datasetId = "gtex_v8",
  tissueSiteDetailIds = NULL
)

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.

Value

A tibble, with clustering data stored as an attribute, "clusters".

See Also

Other Expression Data Endpoints: get_clustered_median_exon_expression(), get_clustered_median_gene_expression(), get_clustered_median_junction_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(), get_single_nucleus_gex_summary(), get_top_expressed_genes()

Examples

## Not run: 
get_clustered_median_transcript_expression(gencodeIds = c("ENSG00000203782.5",
                                                    "ENSG00000132693.12"))

# clustering data is stored as an attribute "clusters"
result <- get_clustered_median_transcript_expression(c("ENSG00000203782.5",
                                                 "ENSG00000132693.12"))
attr(result, "clusters")

# process clustering data with the ape package
# install.packages("ape")
# phylo_tree <- ape::read.tree(text = attr(result, "clusters")$tissue)
# plot(phylo_tree)
# print(phylo_tree)

## End(Not run)

gtexr documentation built on Sept. 19, 2024, 5:06 p.m.