-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
various typo and documentation fixes; also update getdownloads_page_d…
…ata(), get_file_list(), get_significantTissueEqtlByLocation() and get_linkage_disequilibrium_data()
- Loading branch information
Showing
64 changed files
with
1,377 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source("renv/activate.R") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.Rproj.user | ||
docs | ||
.Rhistory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Package: gtexr | ||
Title: Query the GTEx Portal API | ||
Version: 0.0.0.9000 | ||
Authors@R: | ||
person(given = "Alasdair", | ||
family = "Warwick", | ||
role = c("aut", "cre", "cph"), | ||
email = "alasdair.warwick06@gmail.com", | ||
comment = c(ORCID = "0000-0002-0800-2890")) | ||
Description: A convenient R interface to the GTEx Portal API. | ||
License: MIT + file LICENSE | ||
URL: https://rmgpanw.github.io/gtexr/, | ||
https://github.com/rmgpanw/gtexr | ||
BugReports: https://github.com/rmgpanw/gtexr/issues | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.1 | ||
Imports: | ||
cli, | ||
dplyr, | ||
httr2 (>= 1.0.0), | ||
purrr, | ||
rlang, | ||
tibble, | ||
tidyr | ||
Suggests: | ||
httptest2, | ||
testthat (>= 3.0.0) | ||
Config/testthat/edition: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
YEAR: 2024 | ||
COPYRIGHT HOLDER: gtexr authors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2024 gtexr authors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(available_tissueSiteDetailIds) | ||
export(calculate_eqtls) | ||
export(get_annotation) | ||
export(get_collapsed_gene_model_exon) | ||
export(get_dataset_info) | ||
export(get_downloads_page_data) | ||
export(get_eqtl_genes) | ||
export(get_exons) | ||
export(get_file_list) | ||
export(get_fine_mapping) | ||
export(get_full_get_collapsed_gene_model_exon) | ||
export(get_functional_annotation) | ||
export(get_gene_search) | ||
export(get_genes) | ||
export(get_gwas_catalog_by_location) | ||
export(get_image) | ||
export(get_independent_eqtl) | ||
export(get_linkage_disequilibrium_by_variant_data) | ||
export(get_linkage_disequilibrium_data) | ||
export(get_maintenance_message) | ||
export(get_multi_tissue_eqtls) | ||
export(get_neighbor_gene) | ||
export(get_news_item) | ||
export(get_sample) | ||
export(get_service_info) | ||
export(get_significant_single_tissue_eqtls) | ||
export(get_significant_single_tissue_eqtls_by_location) | ||
export(get_significant_single_tissue_ieqtls) | ||
export(get_significant_single_tissue_isqtls) | ||
export(get_significant_single_tissue_sqtls) | ||
export(get_sqtl_genes) | ||
export(get_subject) | ||
export(get_tissue_site_detail) | ||
export(get_transcripts) | ||
export(get_variant) | ||
export(get_variant_by_location) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
#' Get File List | ||
#' | ||
#' @description | ||
#' - Get all the files in GTEx dataset for Download page | ||
#' | ||
#' [GTEx Portal API documentation] | ||
#' https://gtexportal.org/api/v2/redoc#tag/Datasets-Endpoints/operation/get_file_list_api_v2_dataset_fileList_get | ||
#' [GTEx Portal API | ||
#' documentation](https://gtexportal.org/api/v2/redoc#tag/Datasets-Endpoints/operation/get_file_list_api_v2_dataset_fileList_get) | ||
#' | ||
#'@inheritParams gtexr_arguments | ||
#' | ||
#' @return A Tibble | ||
#' @export | ||
#' @family Datasets Endpoints | ||
#' | ||
#' @examples | ||
#' \dontrun | ||
#' get_file_list() | ||
get_file_list <- function(){ | ||
gtex_query(enpoint = "dataset/fileList") | ||
get_file_list <- function() { | ||
gtex_query(endpoint = "dataset/fileList", | ||
return_raw = TRUE) |> | ||
purrr::map(tibble::as_tibble) |> | ||
dplyr::bind_rows() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 17 additions & 11 deletions
28
R/get_linkage_disequiliribum_data.R → R/get_linkage_disequilibrium_data.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
#'Get Linkage Disequilibrium Data | ||
#' Get Linkage Disequilibrium Data | ||
#' | ||
#'@description | ||
#' @description | ||
#' - Find linkage disequilibrium (LD) data for a given gene. | ||
#' - This endpoint returns linkage disequilibrium data for the cis-eQTLs found associated with the provided gene in a specified dataset. | ||
#' - Results are queried by gencode ID. By default, the service queries the latest GTEx release. | ||
#' - Specify a dataset ID to fetch results from a different dataset. | ||
#' | ||
#'[GTEx Portal API documentation] | ||
#'https://gtexportal.org/api/v2/redoc#tag/Datasets-Endpoints/operation/get_variant_by_location_api_v2_dataset_variantByLocation_get#' | ||
#' [GTEx Portal API documentation](https://gtexportal.org/api/v2/redoc#tag/Datasets-Endpoints/operation/get_variant_by_location_api_v2_dataset_variantByLocation_get) | ||
#' | ||
#'@inheritParams gtexr_arguments | ||
#'@return A Tibble | ||
#'@export | ||
#'@family Dataset Endpoints | ||
#' @inheritParams gtexr_arguments | ||
#' @return A tibble. | ||
#' @export | ||
#'@family Datasets Endpoints | ||
#' | ||
#' @examples | ||
#' \dontrun | ||
#' get_linkage_disequilibrium_data(gencodeIds = c("ENSG00000132693.12", | ||
#' "ENSG00000203782.5")) | ||
get_linkage_disequilibirum_data <- function(gencodeIds, | ||
get_linkage_disequilibrium_data <- function(gencodeIds, | ||
datasetId = "gtex_v8", | ||
page = 0, | ||
itemsPerPage = 250){ | ||
gtex_query(endpoint = "dataset/ld") | ||
gtex_query(endpoint = "dataset/ld", | ||
return_raw = TRUE)$data |> | ||
purrr::map(\(x) tibble::tibble(variants = x[[1]], ld = x[[2]])) |> | ||
dplyr::bind_rows() |> | ||
tidyr::separate_wider_delim( | ||
cols = "variants", | ||
delim = ",", | ||
names = c("variantId_1", "variantId_2") | ||
) | ||
} |
Oops, something went wrong.