Given a KGX Neo4j KG engine, returns a graph representing the diversity of node categories and edge predicates for browsing. The returned graph is guaranteed to contain at least one node of every category, and at least one edge of every predicate. No other guarantees are made: the example graph is not minimal to satisfy these criteria, it is not random or even pseudo-random, and it may not be connected.

# S3 method for class 'neo4j_engine'
example_graph(engine, ...)

Arguments

engine

A neo4j_engine object

...

Other parameters (not used)

Value

A tbl_kgx graph

Examples

# Retrieve and print an example graph:
g <- monarch_engine() |> example_graph()
#> Trying to connect to https://neo4j.monarchinitiative.org
#> Connected to https://neo4j.monarchinitiative.org
print(g)
#> # A tbl_graph: 63 nodes and 37 edges
#> #
#> # A directed acyclic multigraph with 27 components
#> #
#> # Node Data: 63 × 16 (active)
#>    id         category pcategory name  symbol in_taxon_label description synonym
#>    <chr>      <list>   <chr>     <chr> <chr>  <chr>          <chr>       <list> 
#>  1 GO:0006493 <chr>    biolink:… prot… NA     NA             A protein … <chr>  
#>  2 RGD:62060  <chr>    biolink:… Ogt   Ogt    Rattus norveg… NA          <chr>  
#>  3 NCBIGene:… <chr>    biolink:… OGT   OGT    Canis lupus f… O-linked N… <lgl>  
#>  4 GO:0000123 <chr>    biolink:… hist… NA     NA             A protein … <chr>  
#>  5 RGD:3982   <chr>    biolink:… Yy1   Yy1    Rattus norveg… NA          <chr>  
#>  6 GO:0010467 <chr>    biolink:… gene… NA     NA             The proces… <lgl>  
#>  7 MONDO:010… <chr>    biolink:… over… NA     NA             A disease … <chr>  
#>  8 CLINVAR:1… <chr>    biolink:… NM_0… NA     Homo sapiens   NA          <lgl>  
#>  9 OBA:20500… <chr>    biolink:… seru… NA     NA             The amount… <chr>  
#> 10 HP:0003542 <chr>    biolink:… Incr… NA     NA             The concen… <chr>  
#> # ℹ 53 more rows
#> # ℹ 8 more variables: iri <chr>, xref <list>, namespace <chr>,
#> #   provided_by <list>, full_name <chr>, in_taxon <list>, type <list>,
#> #   has_gene <list>
#> #
#> # Edge Data: 37 × 22
#>    from    to subject   predicate  object primary_knowledge_so…¹ knowledge_level
#>   <int> <int> <chr>     <chr>      <chr>  <chr>                  <chr>          
#> 1     2     1 RGD:62060 biolink:a… GO:00… infores:rgd            knowledge_asse…
#> 2     2     3 RGD:62060 biolink:o… NCBIG… infores:panther        knowledge_asse…
#> 3     2     4 RGD:62060 biolink:p… GO:00… infores:rgd            knowledge_asse…
#> # ℹ 34 more rows
#> # ℹ abbreviated name: ¹​primary_knowledge_source
#> # ℹ 15 more variables: negated <lgl>, species_context_qualifier <chr>,
#> #   agent_type <chr>, knowledge_source <chr>,
#> #   aggregator_knowledge_source <list>, has_evidence <list>,
#> #   provided_by <list>, id <chr>, category <list>, publications <list>,
#> #   original_object <chr>, qualifiers <list>, original_predicate <chr>, …