This function is a wrapper around the Monarch-hosted search API. It returns nodes (no edges) from the Monarch KG, fetched via an instance of monarch_engine().

monarch_search(query, category = NULL, limit = 10, ...)

Arguments

query

Search query string, e.g. "Cystic fibrosis"

category

A set of node category labels to limit the search to, e.g. c("biolink:Disease", "biolink:Gene")

limit

Maximum number of nodes to return. Default 10.

...

Parameters passed to monarch_engine().

Value

A local tbl_kgx graph with no edges.

Examples

cf_hits <- monarch_search("Cystic fibrosis", category = "biolink:Disease", limit = 5)
#> Trying to connect to https://neo4j.monarchinitiative.org
#> Connected to https://neo4j.monarchinitiative.org
print(cf_hits)
#> # A tbl_graph: 5 nodes and 0 edges
#> #
#> # A rooted forest with 5 trees
#> #
#> # Node Data: 5 × 10 (active)
#>   id          pcategory name  description synonym category iri   xref  namespace
#>   <chr>       <chr>     <chr> <chr>       <named> <named > <chr> <nam> <chr>    
#> 1 MONDO:0009… biolink:… cyst… Cystic fib… <chr>   <chr>    http… <chr> MONDO    
#> 2 MONDO:1010… biolink:… cyst… Cystic fib… <lgl>   <chr>    http… <chr> MONDO    
#> 3 MONDO:1010… biolink:… cyst… Cystic fib… <lgl>   <chr>    http… <chr> MONDO    
#> 4 MONDO:1010… biolink:… cyst… Cystic fib… <lgl>   <chr>    http… <chr> MONDO    
#> 5 MONDO:0005… biolink:… cyst… Cystic fib… <chr>   <chr>    http… <chr> MONDO    
#> # ℹ 1 more variable: provided_by <named list>
#> #
#> # Edge Data: 0 × 5
#> # ℹ 5 variables: from <int>, to <int>, subject <chr>, predicate <chr>,
#> #   object <chr>