... | ... |
@@ -167,4 +167,7 @@ |
167 | 167 |
- Made sure the package passes BUILD and CHECK with no internet connection. |
168 | 168 |
- Correction in vignette: using yeast genome for `topGO`, instead of human (somehow it was not applied in 1.0.5). |
169 | 169 |
|
170 |
+## Version 1.2.1 |
|
171 |
+ |
|
172 |
+ - Go term namespace added to the information extracted by `fetch_go`. |
|
170 | 173 |
|
... | ... |
@@ -99,16 +99,17 @@ parse_obo_file <- function(obo) { |
99 | 99 |
#' @noRd |
100 | 100 |
extract_obo_terms <- function(parsed) { |
101 | 101 |
# Binding variables from non-standard evaluation locally |
102 |
- key <- term_id <- value <- term_name <- NULL |
|
102 |
+ key <- term_id <- value <- name <- term_name <- namespace <- NULL |
|
103 | 103 |
|
104 | 104 |
terms <- parsed |> |
105 |
- dplyr::filter(key == "name") |> |
|
106 |
- dplyr::select(term_id, term_name = value) |
|
105 |
+ dplyr::filter(key %in% c("name", "namespace")) |> |
|
106 |
+ tidyr::pivot_wider(id_cols = term_id, names_from = key, values_from = value) |> |
|
107 |
+ dplyr::rename(term_name = name) |
|
107 | 108 |
|
108 | 109 |
alt_terms <- parsed |> |
109 | 110 |
dplyr::filter(key == "alt_id") |> |
110 | 111 |
dplyr::left_join(terms, by = "term_id") |> |
111 |
- dplyr::select(term_id = value, term_name) |
|
112 |
+ dplyr::select(term_id = value, term_name, namespace) |
|
112 | 113 |
|
113 | 114 |
dplyr::bind_rows( |
114 | 115 |
terms, |
... | ... |
@@ -9,16 +9,9 @@ test_that("Incorrect species in fetch_go", { |
9 | 9 |
expect_error(fetch_go(species = "not a species")) |
10 | 10 |
}) |
11 | 11 |
|
12 |
- |
|
13 |
-test_that("Incorrect mart in fetch_go", { |
|
14 |
- expect_error(fetch_go(mart = 1)) |
|
15 |
- expect_error(fetch_go(mart = "mart")) |
|
16 |
-}) |
|
17 |
- |
|
18 |
- |
|
19 | 12 |
test_that("Incorrect dataset triggers error", { |
20 | 13 |
expect_error(fetch_go(dataset = "not a dataset")) |
21 |
- expect_error(fetch_go_from_bm(dataset = "not a dataset")) |
|
14 |
+ expect_error(fetch_go_from_bm(dataset = "not a dataset", use_cache = FALSE, on_error = "stop")) |
|
22 | 15 |
}) |
23 | 16 |
|
24 | 17 |
test_that("Processing OBO file", { |