Skip to content

Commit

Permalink
add genocode id computation
Browse files Browse the repository at this point in the history
  • Loading branch information
berntpopp committed Sep 14, 2023
1 parent 8ec1fe7 commit 82521fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion analyses/AnnotateMergedTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -830,14 +830,22 @@ hpo_gene_list_symptome_groups_summarized_for_join <- hpo_gene_list_symptome_grou
# TODO: annotate StringDB interactions with strong evidence kidney genes
# use download tables: https://string-db.org/cgi/download?sessionId=bVJC28yKCRz5&species_text=Homo+sapiens
# eg physical: https://stringdb-downloads.org/download/protein.physical.links.v12.0/9606.protein.physical.links.v12.0.txt.gz
# sum the interactions for each gene with the high evidence list, the percentile normalize, additionally show a sting with interacting genes and scores
# sum the interactions for each gene with the high evidence list, the percentile normalize, additionally show a string with interacting genes and scores
############################################


############################################
# TODO: move this to HGNC table
# TODO: annotate GTEx kidney expression
# use https://gtexportal.org/api/v2/redoc#tag/GTEx-Portal-API-Info

# Endpoint to use:
# https://gtexportal.org/api/v2/expression/medianGeneExpression?gencodeId=ENSG00000008710.19&gencodeId=ENSG00000203782.5
# we need enseble gene ids with version




# see GitHub issue for cutoffs
# TODO: maybe add expression in embryonic kidney from somewhere (e.g. https://descartes.brotmanbaty.org/)
# descartes: https://atlas.fredhutch.org/data/bbi/descartes/human_gtex/tables/tissue_tpm/kidney.csv (this one for TPM)
Expand Down
8 changes: 4 additions & 4 deletions analyses/functions/gtex-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require(httr)
require(jsonlite)
require(tidyverse)
require(purrr)

library(dplyr)

#' Get Median Tissue Expression Levels from GTEx API
#'
Expand Down Expand Up @@ -50,8 +50,8 @@ get_median_tissue_expression <- function(gencode_ids) {
#' Fetch Median Tissue Expression Levels from GTEx API for Multiple Genes
#'
#' This function takes a character vector of GENCODE gene identifiers as input,
#' splits it into appropriate chunks to fit the API input size limitations,
#' makes a GET request for each chunk of gene identifiers to the GTEx API,
#' splits it into appropriate chunks to fit the API input size limitations,
#' makes a GET request for each chunk of gene identifiers to the GTEx API,
#' and returns the median tissue expression levels as a tibble.
#'
#' @param gencode_ids A character vector representing the GENCODE gene identifiers.
Expand Down Expand Up @@ -106,7 +106,7 @@ get_multiple_median_tissue_expression <- function(gencode_ids, max_ids_per_reque
#' }
#' @export
get_gencode_ids <- function(gene_symbols) {

# Prepare the API URL
base_url <- "https://gtexportal.org/api/v2/reference/gene?"
ids_query <- paste0("geneId=", gene_symbols, collapse = "&")
Expand Down

0 comments on commit 82521fe

Please sign in to comment.