From 50de5b16f851099b503c2b82889f4726814716bb Mon Sep 17 00:00:00 2001 From: Marek Gierlinski Date: Thu, 11 Apr 2024 10:31:51 +0100 Subject: [PATCH] Biomart query does not work well with caching, so I had to remove caching --- R/go.R | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/R/go.R b/R/go.R index 3d5a48b..df1cc8c 100644 --- a/R/go.R +++ b/R/go.R @@ -266,7 +266,7 @@ fetch_go_from_go <- function(species, use_cache, on_error = "stop") { #' will halt the function execution and throw an error, while `"warn"` will #' issue a warning and return `NULL`. #' -#' @return A tibble with columns \code{ensembl_gene_id}, \code{gene_symbol} and +#' @return A tibble with columns \code{gene_id}, \code{gene_symbol} and #' \code{term_id}. #' @noRd fetch_go_genes_bm <- function(dataset, use_cache = TRUE, on_error = c("stop", "warn")) { @@ -276,10 +276,11 @@ fetch_go_genes_bm <- function(dataset, use_cache = TRUE, on_error = c("stop", "w if(!assert_url_path(qry, on_error)) return(NULL) - lpath <- cached_url_path(stringr::str_glue("biomart_{dataset}"), qry, use_cache) - res <- readr::read_tsv(lpath, show_col_types = FALSE) + # Problems with cache, bfcneedsupdate returns error for this query + # lpath <- cached_url_path(stringr::str_glue("biomart_{dataset}"), qry, use_cache) + res <- readr::read_tsv(qry, show_col_types = FALSE) if(ncol(res) == 3) { - res |> rlang::set_names(c("ensembl_gene_id", "gene_symbol", "term_id")) + res |> rlang::set_names(c("gene_id", "gene_symbol", "term_id")) } else { warning("Problem with Biomart") return(NULL)