diff --git a/R/get_tissue_site_detail.R b/R/get_tissue_site_detail.R index f567640..b224acc 100644 --- a/R/get_tissue_site_detail.R +++ b/R/get_tissue_site_detail.R @@ -1,19 +1,35 @@ -#'Get Tissue Site Detail +#' Get Tissue Site Detail #' -#'@description -#' - Retrieve all tissue site detail information in the database +#' @description Retrieve all tissue site detail information in the database #' -#'[GTEx Portal API -#'documentation](https://gtexportal.org/api/v2/redoc#tag/Datasets-Endpoints/operation/get_tissue_site_detail_api_v2_dataset_tissueSiteDetail_get) +#' [GTEx Portal API +#' documentation](https://gtexportal.org/api/v2/redoc#tag/Datasets-Endpoints/operation/get_tissue_site_detail_api_v2_dataset_tissueSiteDetail_get) #' -#'@inheritParams gtexr_arguments -#'@return A Tibble -#'@export -#'@family Datasets Endpoints +#' @inheritParams gtexr_arguments +#' @return A tibble +#' @export +#' @family Datasets Endpoints #' #' @examples -#' get_tissue_site_detail() +#' \dontrun{ +#' # returns a tibble with one row per tissue +#' get_tissue_site_detail() +#' +#' # `eqtlSampleSummary` and `rnaSeqSampleSummary` are list columns +#' bladder_site_details <- get_tissue_site_detail() |> +#' dplyr::filter(tissueSiteDetailId == "Bladder") +#' +#' purrr::pluck(bladder_site_details, "eqtlSampleSummary", 1) +#' +#' purrr::pluck(bladder_site_details, "rnaSeqSampleSummary", 1) +#' } get_tissue_site_detail <- function(page = 0, itemsPerPage = 250){ - gtex_query(endpoint = "dataset/tissueSiteDetail") + result <- gtex_query(endpoint = "dataset/tissueSiteDetail", return_raw = TRUE) + + paging_info_messages(result) + + result$data |> + purrr::map(\(x) purrr::map_if(x, is.list, \(y) list(y))) |> + dplyr::bind_rows() } diff --git a/man/get_annotation.Rd b/man/get_annotation.Rd index 19fe038..dd5877b 100644 --- a/man/get_annotation.Rd +++ b/man/get_annotation.Rd @@ -45,7 +45,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_clustered_median_exon_expression.Rd b/man/get_clustered_median_exon_expression.Rd index 7831d01..4eece6e 100644 --- a/man/get_clustered_median_exon_expression.Rd +++ b/man/get_clustered_median_exon_expression.Rd @@ -55,8 +55,8 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_clustered_median_gene_expression.Rd b/man/get_clustered_median_gene_expression.Rd index 28108b5..679e15d 100644 --- a/man/get_clustered_median_gene_expression.Rd +++ b/man/get_clustered_median_gene_expression.Rd @@ -56,8 +56,8 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_clustered_median_junction_expression.Rd b/man/get_clustered_median_junction_expression.Rd index aa5e268..f784e79 100644 --- a/man/get_clustered_median_junction_expression.Rd +++ b/man/get_clustered_median_junction_expression.Rd @@ -55,8 +55,8 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_clustered_median_transcript_expression.Rd b/man/get_clustered_median_transcript_expression.Rd index bf9a644..99e8d76 100644 --- a/man/get_clustered_median_transcript_expression.Rd +++ b/man/get_clustered_median_transcript_expression.Rd @@ -56,8 +56,8 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_collapsed_gene_model_exon.Rd b/man/get_collapsed_gene_model_exon.Rd index a664d4e..32ebbbc 100644 --- a/man/get_collapsed_gene_model_exon.Rd +++ b/man/get_collapsed_gene_model_exon.Rd @@ -52,7 +52,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_downloads_page_data.Rd b/man/get_downloads_page_data.Rd index 9819c41..7250340 100644 --- a/man/get_downloads_page_data.Rd +++ b/man/get_downloads_page_data.Rd @@ -60,7 +60,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_eqtl_genes.Rd b/man/get_eqtl_genes.Rd index a447ca2..ba41b21 100644 --- a/man/get_eqtl_genes.Rd +++ b/man/get_eqtl_genes.Rd @@ -58,8 +58,8 @@ Other Static Association Endpoints: \code{\link{get_fine_mapping}()}, \code{\link{get_independent_eqtl}()}, \code{\link{get_multi_tissue_eqtls}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_ieqtls}()}, \code{\link{get_significant_single_tissue_isqtls}()}, \code{\link{get_significant_single_tissue_sqtls}()}, diff --git a/man/get_expression_pca.Rd b/man/get_expression_pca.Rd index 720e19e..5d4d813 100644 --- a/man/get_expression_pca.Rd +++ b/man/get_expression_pca.Rd @@ -58,8 +58,8 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_file_list.Rd b/man/get_file_list.Rd index 30259da..9cfd8e8 100644 --- a/man/get_file_list.Rd +++ b/man/get_file_list.Rd @@ -47,7 +47,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_fine_mapping.Rd b/man/get_fine_mapping.Rd index f482d49..54bde73 100644 --- a/man/get_fine_mapping.Rd +++ b/man/get_fine_mapping.Rd @@ -63,8 +63,8 @@ Other Static Association Endpoints: \code{\link{get_eqtl_genes}()}, \code{\link{get_independent_eqtl}()}, \code{\link{get_multi_tissue_eqtls}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_ieqtls}()}, \code{\link{get_significant_single_tissue_isqtls}()}, \code{\link{get_significant_single_tissue_sqtls}()}, diff --git a/man/get_full_get_collapsed_gene_model_exon.Rd b/man/get_full_get_collapsed_gene_model_exon.Rd index 64422bd..11e226e 100644 --- a/man/get_full_get_collapsed_gene_model_exon.Rd +++ b/man/get_full_get_collapsed_gene_model_exon.Rd @@ -40,7 +40,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_functional_annotation.Rd b/man/get_functional_annotation.Rd index 8405fd3..0b616f3 100644 --- a/man/get_functional_annotation.Rd +++ b/man/get_functional_annotation.Rd @@ -56,7 +56,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_gene_expression.Rd b/man/get_gene_expression.Rd index 00ffe5b..0c3c15c 100644 --- a/man/get_gene_expression.Rd +++ b/man/get_gene_expression.Rd @@ -59,8 +59,8 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_independent_eqtl.Rd b/man/get_independent_eqtl.Rd index 6799098..055282c 100644 --- a/man/get_independent_eqtl.Rd +++ b/man/get_independent_eqtl.Rd @@ -59,8 +59,8 @@ Other Static Association Endpoints: \code{\link{get_eqtl_genes}()}, \code{\link{get_fine_mapping}()}, \code{\link{get_multi_tissue_eqtls}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_ieqtls}()}, \code{\link{get_significant_single_tissue_isqtls}()}, \code{\link{get_significant_single_tissue_sqtls}()}, diff --git a/man/get_linkage_disequilibrium_by_variant_data.Rd b/man/get_linkage_disequilibrium_by_variant_data.Rd index 3f85110..22fb9f7 100644 --- a/man/get_linkage_disequilibrium_by_variant_data.Rd +++ b/man/get_linkage_disequilibrium_by_variant_data.Rd @@ -42,7 +42,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_linkage_disequilibrium_data.Rd b/man/get_linkage_disequilibrium_data.Rd index a381c57..05e4b67 100644 --- a/man/get_linkage_disequilibrium_data.Rd +++ b/man/get_linkage_disequilibrium_data.Rd @@ -51,7 +51,7 @@ Other Datasets Endpoints: \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_median_exon_expression.Rd b/man/get_median_exon_expression.Rd index 38f7ee1..3e3de49 100644 --- a/man/get_median_exon_expression.Rd +++ b/man/get_median_exon_expression.Rd @@ -56,8 +56,8 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_median_gene_expression.Rd b/man/get_median_gene_expression.Rd index 4fe6858..e239efd 100644 --- a/man/get_median_gene_expression.Rd +++ b/man/get_median_gene_expression.Rd @@ -55,8 +55,8 @@ Other Expression Data Endpoints: \code{\link{get_median_exon_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_median_junction_expression.Rd b/man/get_median_junction_expression.Rd index 7276110..b40fc45 100644 --- a/man/get_median_junction_expression.Rd +++ b/man/get_median_junction_expression.Rd @@ -54,8 +54,8 @@ Other Expression Data Endpoints: \code{\link{get_median_exon_expression}()}, \code{\link{get_median_gene_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_median_transcript_expression.Rd b/man/get_median_transcript_expression.Rd index b0dcde6..5e94f7e 100644 --- a/man/get_median_transcript_expression.Rd +++ b/man/get_median_transcript_expression.Rd @@ -54,8 +54,8 @@ Other Expression Data Endpoints: \code{\link{get_median_exon_expression}()}, \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()}, \code{\link{get_top_expressed_genes}()} } \concept{Expression Data Endpoints} diff --git a/man/get_multi_tissue_eqtls.Rd b/man/get_multi_tissue_eqtls.Rd index ddb3e39..ff2dd9c 100644 --- a/man/get_multi_tissue_eqtls.Rd +++ b/man/get_multi_tissue_eqtls.Rd @@ -55,8 +55,8 @@ Other Static Association Endpoints: \code{\link{get_eqtl_genes}()}, \code{\link{get_fine_mapping}()}, \code{\link{get_independent_eqtl}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_ieqtls}()}, \code{\link{get_significant_single_tissue_isqtls}()}, \code{\link{get_significant_single_tissue_sqtls}()}, diff --git a/man/get_sample_datasets_endpoints.Rd b/man/get_sample_datasets_endpoints.Rd index 7214556..4032de3 100644 --- a/man/get_sample_datasets_endpoints.Rd +++ b/man/get_sample_datasets_endpoints.Rd @@ -133,7 +133,7 @@ Other Datasets Endpoints: \code{\link{get_linkage_disequilibrium_data}()}, \code{\link{get_subject}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_significant_single_tissue_ieqtls.Rd b/man/get_significant_single_tissue_ieqtls.Rd index dc27a9e..e649acf 100644 --- a/man/get_significant_single_tissue_ieqtls.Rd +++ b/man/get_significant_single_tissue_ieqtls.Rd @@ -57,8 +57,8 @@ Other Static Association Endpoints: \code{\link{get_fine_mapping}()}, \code{\link{get_independent_eqtl}()}, \code{\link{get_multi_tissue_eqtls}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_isqtls}()}, \code{\link{get_significant_single_tissue_sqtls}()}, \code{\link{get_sqtl_genes}()} diff --git a/man/get_significant_single_tissue_isqtls.Rd b/man/get_significant_single_tissue_isqtls.Rd index dbe3ab6..afa2748 100644 --- a/man/get_significant_single_tissue_isqtls.Rd +++ b/man/get_significant_single_tissue_isqtls.Rd @@ -58,8 +58,8 @@ Other Static Association Endpoints: \code{\link{get_fine_mapping}()}, \code{\link{get_independent_eqtl}()}, \code{\link{get_multi_tissue_eqtls}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_ieqtls}()}, \code{\link{get_significant_single_tissue_sqtls}()}, \code{\link{get_sqtl_genes}()} diff --git a/man/get_significant_single_tissue_sqtls.Rd b/man/get_significant_single_tissue_sqtls.Rd index 2dc01ba..028a556 100644 --- a/man/get_significant_single_tissue_sqtls.Rd +++ b/man/get_significant_single_tissue_sqtls.Rd @@ -54,8 +54,8 @@ Other Static Association Endpoints: \code{\link{get_fine_mapping}()}, \code{\link{get_independent_eqtl}()}, \code{\link{get_multi_tissue_eqtls}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_ieqtls}()}, \code{\link{get_significant_single_tissue_isqtls}()}, \code{\link{get_sqtl_genes}()} diff --git a/man/get_sqtl_genes.Rd b/man/get_sqtl_genes.Rd index 75f4daa..80c152c 100644 --- a/man/get_sqtl_genes.Rd +++ b/man/get_sqtl_genes.Rd @@ -49,8 +49,8 @@ Other Static Association Endpoints: \code{\link{get_fine_mapping}()}, \code{\link{get_independent_eqtl}()}, \code{\link{get_multi_tissue_eqtls}()}, -\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_eqtls}()}, +\code{\link{get_significant_single_tissue_eqtls_by_location}()}, \code{\link{get_significant_single_tissue_ieqtls}()}, \code{\link{get_significant_single_tissue_isqtls}()}, \code{\link{get_significant_single_tissue_sqtls}()} diff --git a/man/get_subject.Rd b/man/get_subject.Rd index cabbddb..c03d61c 100644 --- a/man/get_subject.Rd +++ b/man/get_subject.Rd @@ -60,7 +60,7 @@ Other Datasets Endpoints: \code{\link{get_linkage_disequilibrium_data}()}, \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_tissue_site_detail}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_tissue_site_detail.Rd b/man/get_tissue_site_detail.Rd index 16669dc..4defa29 100644 --- a/man/get_tissue_site_detail.Rd +++ b/man/get_tissue_site_detail.Rd @@ -12,17 +12,26 @@ get_tissue_site_detail(page = 0, itemsPerPage = 250) \item{itemsPerPage}{Integer (default = 250).} } \value{ -A Tibble +A tibble } \description{ -\itemize{ -\item Retrieve all tissue site detail information in the database -} +Retrieve all tissue site detail information in the database \href{https://gtexportal.org/api/v2/redoc#tag/Datasets-Endpoints/operation/get_tissue_site_detail_api_v2_dataset_tissueSiteDetail_get}{GTEx Portal API documentation} } \examples{ -get_tissue_site_detail() +\dontrun{ + # returns a tibble with one row per tissue + get_tissue_site_detail() + + # `eqtlSampleSummary` and `rnaSeqSampleSummary` are list columns + bladder_site_details <- get_tissue_site_detail() |> + dplyr::filter(tissueSiteDetailId == "Bladder") + + purrr::pluck(bladder_site_details, "eqtlSampleSummary", 1) + + purrr::pluck(bladder_site_details, "rnaSeqSampleSummary", 1) +} } \seealso{ Other Datasets Endpoints: @@ -36,7 +45,7 @@ Other Datasets Endpoints: \code{\link{get_linkage_disequilibrium_data}()}, \code{\link{get_sample_datasets_endpoints}()}, \code{\link{get_subject}()}, -\code{\link{get_variant_by_location}()}, -\code{\link{get_variant}()} +\code{\link{get_variant}()}, +\code{\link{get_variant_by_location}()} } \concept{Datasets Endpoints} diff --git a/man/get_top_expressed_genes.Rd b/man/get_top_expressed_genes.Rd index 59e24d3..4861c8b 100644 --- a/man/get_top_expressed_genes.Rd +++ b/man/get_top_expressed_genes.Rd @@ -56,7 +56,7 @@ Other Expression Data Endpoints: \code{\link{get_median_gene_expression}()}, \code{\link{get_median_junction_expression}()}, \code{\link{get_median_transcript_expression}()}, -\code{\link{get_single_nucleus_gex_summary}()}, -\code{\link{get_single_nucleus_gex}()} +\code{\link{get_single_nucleus_gex}()}, +\code{\link{get_single_nucleus_gex_summary}()} } \concept{Expression Data Endpoints}