Skip to content

Commit b87b284

Browse files
authored
Merge pull request #79 from monarch-initiative/appnotes
Some fixes for #80 and #82
2 parents 834cc07 + 6022c34 commit b87b284

File tree

8 files changed

+26
-14
lines changed

8 files changed

+26
-14
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Type: Package
33
Title: Monarch Knowledge Graph Queries
44
Description: R package for easy access, manipulation, and analysis of
55
Monarch KG data Resources.
6-
Version: 2.1
6+
Version: 2.1.1
77
URL: https://github.com/monarch-initiative/monarchr
88
BugReports: https://github.com/monarch-initiative/monarchr/issues
99
Authors@R:

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# monarchr 2.1.1
2+
3+
## Bug Fixes
4+
5+
* Fixed a bug in `file_engine` `expand()` not including the query graph on transitive expansions
6+
* Temporarily set `edge_color` default to `NULL` until `ggplot` 4.0.1 is released with [this](https://github.com/tidyverse/ggplot2/issues/6669) bugfix
7+
* Update badges
8+
19
# monarchr 2.1
210

311
## New features

R/expand_file_engine.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ transitive_query_internal <- function(engine,
4949
filter(purrr::map_lgl(category, ~ any(.x %in% categories)) | id %in% query_ids)
5050
}
5151

52+
suppressMessages(bfs_result <- kg_join(g, bfs_result), classes = "message")
53+
5254
attr(bfs_result, "last_engine") <- engine
5355
return(bfs_result)
5456
}

R/plot.tbl_kgx.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' @param layout The layout to use for the plot. Default is "auto" as used by `ggraph`.
66
#' @param node_color The column to use for node color. Default is "pcategory".
77
#' @param node_shape The column to use for node shape Default is "namespace".
8-
#' @param edge_color The column to use for edge color. Default is "predicate".
8+
#' @param edge_color The column to use for edge color. Default is NULL.
99
#' @param edge_linetype The column to use for edge line type. Default is "primary_knowledge_source".
1010
#' @param node_label The column to use for node labels. Defaults to "name".
1111
#' @param plot_ids Whether to show node IDs in node labels. Defaults to FALSE.
@@ -33,7 +33,7 @@ plot.tbl_kgx <- function(g,
3333
layout = "auto",
3434
node_color = pcategory,
3535
node_shape = namespace,
36-
edge_color = predicate,
36+
edge_color = NULL,
3737
edge_linetype = primary_knowledge_source,
3838
node_label = name,
3939
plot_ids = FALSE,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ monarchr
22
================
33
[![License: MIT + file
44
LICENSE](https://img.shields.io/badge/license-MIT%20+%20file%20LICENSE-blue.svg)](https://cran.r-project.org/web/licenses/MIT%20+%20file%20LICENSE)
5-
[![](https://img.shields.io/badge/devel%20version-1.5.0-black.svg)](https://github.com/monarch-initiative/monarchr)
5+
[![](https://img.shields.io/badge/devel%20version-2.1.1-black.svg)](https://github.com/monarch-initiative/monarchr)
66
<br> [![R build
77
status](https://github.com/monarch-initiative/monarchr/workflows/rworkflows/badge.svg)](https://github.com/monarch-initiative/monarchr/actions)
88
[![](https://codecov.io/gh/monarch-initiative/monarchr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/monarch-initiative/monarchr)

man/plot.tbl_kgx.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-neo4j_engine.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ library(assertthat)
44
test_that("neo4j_engine caching", {
55
e <- neo4j_engine(url = c("http://neo4j.monarchinitiative.org:7474",
66
"http://neo4j.monarchinitiative.org",
7-
"http://no.such.url"),
7+
"https://neo4j.monarchinitiative.org",
8+
"http://no.such.url"),
89
cache = TRUE)
910

1011
start_time <- Sys.time()
@@ -37,6 +38,7 @@ test_that("neo4j_engine works as expected (using monarch neo4j db)", {
3738

3839
# one of these should work
3940
e <- neo4j_engine(url = c("http://neo4j.monarchinitiative.org",
41+
"https://neo4j.monarchinitiative.org",
4042
"http://no.such.url",
4143
"http://neo4j.monarchinitiative.org:7474"))
4244

vignettes/examples/engine_preferences.Rmd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ library(dplyr)
4545
data(eds_marfan_kg)
4646
4747
g <- eds_marfan_kg |> fetch_nodes(query_ids = "HP:0001788") |>
48-
expand(categories = "biolink:Disease") |>
49-
expand(categories = "biolink:Gene")
48+
expand(categories = "biolink:Disease") |>
49+
expand(categories = "biolink:Gene")
5050
5151
nodes(g) |> select(id, name, pcategory, category)
5252
```
@@ -60,12 +60,12 @@ We can adjust this when initializing the engine. To do so in this example we nee
6060
filename <- filename <- system.file("extdata", "eds_marfan_kg.tar.gz", package = "monarchr")
6161
6262
eds_marfan_kg <- file_engine(filename,
63-
preferences = list(category_priority = c("biolink:GenomicEntity",
63+
preferences = list(category_priority = c("biolink:GenomicEntity",
6464
"biolink:DiseaseOrPhenotypicFeature")))
6565
6666
g <- eds_marfan_kg |> fetch_nodes(query_ids = "HP:0001788") |>
67-
expand(categories = "biolink:Disease") |>
68-
expand(categories = "biolink:Gene")
67+
expand(categories = "biolink:Disease") |>
68+
expand(categories = "biolink:Gene")
6969
7070
nodes(g) |> select(id, name, pcategory, category)
7171
```
@@ -89,10 +89,10 @@ constructor:
8989
monarch <- monarch_engine(cache = FALSE)
9090
9191
g1 <- monarch |> fetch_nodes(query_ids = "HP:0001788") |>
92-
expand()
92+
expand()
9393
9494
g2 <- monarch |> fetch_nodes(query_ids = "HP:0001788") |>
95-
expand()
95+
expand()
9696
```
9797

9898
In the above example, because caching is disabled, the fetch and expansion are re-run in computing `g2`.

0 commit comments

Comments
 (0)