Skip to content

Commit

Permalink
Minor changes for Bioconductor release.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekGierlinski committed Oct 11, 2023
1 parent d1e672d commit 6bd0a7a
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fenr
Title: Fast functional enrichment for interactive applications
Version: 0.99.6
Version: 0.99.7
Authors@R: person(
given = "Marek",
family = "Gierlinski",
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,7 @@
- Replaced yeast with simpler organisms in Wiki and KEGG tests to speed up testing
- Replaced yeast with simpler organisms in Wiki and KEGG examples to speed up checking


## Version 0.99.7

- Minor changes to prepare for Bioconductor release
- Reverting temporarily to *readr* version 1 to circumvent a *vroom* 1.6.4 bug
6 changes: 6 additions & 0 deletions R/go.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ fetch_go_terms <- function(obo_file = "http://purl.obolibrary.org/obo/go.obo",
# Binding variables from non-standard evaluation locally
key <- term_id <- value <- term_name <- NULL

# Temporary patch to circumvent vroom 1.6.4 bug
readr::local_edition(1)

lpath <- cached_url_path("obo", obo_file, use_cache)
parsed <- readr::read_lines(lpath) |>
parse_obo_file()
Expand Down Expand Up @@ -122,6 +125,9 @@ fetch_go_genes_go <- function(species, use_cache) {
gene_synonym <- db_object_synonym <- symbol <- NULL
db_id <- go_term <- NULL

# Temporary patch to circumvent vroom 1.6.4 bug
readr::local_edition(1)

gaf_file <- stringr::str_glue("http://current.geneontology.org/annotations/{species}.gaf.gz")
assert_url_path(gaf_file)

Expand Down
4 changes: 2 additions & 2 deletions R/iteractive_example.R → R/interactive_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ main_plot <- function(de, input) {
#' @importFrom assertthat assert_that
#' @export
#' @examples
#' \dontrun{
#' data(yeast_de)
#' term_data <- fetch_terms_for_example(yeast_de)
#' enrichment_interactive(yeast_de, term_data)
#' if(interactive()) {
#' enrichment_interactive(yeast_de, term_data)
#' }
enrichment_interactive <- function(de, term_data) {
assert_that(is.data.frame(de))
Expand Down
7 changes: 7 additions & 0 deletions R/kegg.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ fetch_kegg_data <- function(path) {
#' @examples
#' spe <- fetch_kegg_species()
fetch_kegg_species <- function() {

# Temporary patch to circumvent vroom 1.6.4 bug
readr::local_edition(1)

s <- fetch_kegg_data("list/organism")
readr::read_tsv(I(s), col_names = c("id", "designation", "species", "phylogeny"), show_col_types = FALSE)
}
Expand All @@ -37,6 +41,9 @@ fetch_kegg_pathways <- function(species) {
# Binding variables from non-standard evaluation locally
term_id <- NULL

# Temporary patch to circumvent vroom 1.6.4 bug
readr::local_edition(1)

query <- stringr::str_glue("list/pathway/{species}")
url <- file.path(KEGG_BASE_URL, query)
if(!assert_url_path(url, stop_if_error = FALSE))
Expand Down
6 changes: 6 additions & 0 deletions R/reactome.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ fetch_reactome_ensembl_genes <- function(spec, use_cache = TRUE) {
# Binding variables from non-standard evaluation locally
species <- gene_id <- term_id <- NULL

# Temporary patch to circumvent vroom 1.6.4 bug
readr::local_edition(1)

url <- "https://reactome.org/download/current/Ensembl2Reactome.txt"
assert_url_path(url)

Expand All @@ -87,6 +90,9 @@ fetch_reactome_gene_association <- function(tax_id, use_cache = TRUE) {
# Binding variables from non-standard evaluation locally
symbol <- taxon <- db_ref <- db_id <- NULL

# Temporary patch to circumvent vroom 1.6.4 bug
readr::local_edition(1)

gaf_file <- "https://reactome.org/download/current/gene_association.reactome.gz"
assert_url_path(gaf_file)

Expand Down
6 changes: 3 additions & 3 deletions man/enrichment_interactive.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/fetch_terms_for_example.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/testthat/test_kegg.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ test_that("Incorrect batch size in fetch_kegg", {


test_that("Parsing KEGG flat file", {
# Temporary patch to circumvent vroom 1.6.4 bug
readr::local_edition(1)

flat <- readr::read_file("../test_data/kegg_test.txt")
expected <- readr::read_rds("../test_data/kegg_parseing_result.rds")
parsed <- parse_kegg_genes(flat)
Expand Down

0 comments on commit 6bd0a7a

Please sign in to comment.