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: 62 nodes and 37 edges
#> #
#> # A rooted forest with 25 trees
#> #
#> # Node Data: 62 × 17 (active)
#>    id         category pcategory name  symbol in_taxon_label description synonym
#>    <chr>      <list>   <chr>     <chr> <chr>  <chr>          <chr>       <list> 
#>  1 GO:0045892 <chr>    biolink:… nega… NA     NA             Any proces… <chr>  
#>  2 HGNC:8550  <chr>    biolink:… PA2G4 PA2G4  Homo sapiens   NA          <chr>  
#>  3 HGNC:10414 <chr>    biolink:… RPS26 RPS26  Homo sapiens   NA          <chr>  
#>  4 RGD:15829… <chr>    biolink:… Rps2… Rps26… Rattus norveg… NA          <chr>  
#>  5 GO:0015935 <chr>    biolink:… smal… NA     NA             The smalle… <chr>  
#>  6 GO:0019722 <chr>    biolink:… calc… NA     NA             Any intrac… <chr>  
#>  7 HGNC:4383  <chr>    biolink:… GNA15 GNA15  Homo sapiens   NA          <chr>  
#>  8 MONDO:010… <chr>    biolink:… over… NA     NA             A disease … <chr>  
#>  9 CLINVAR:1… <chr>    biolink:… NM_0… NA     Homo sapiens   NA          <lgl>  
#> 10 ZFA:00000… <chr>    biolink:… phar… NA     NA             Skeletal a… <chr>  
#> # ℹ 52 more rows
#> # ℹ 9 more variables: iri <chr>, namespace <chr>, provided_by <list>,
#> #   full_name <chr>, xref <list>, in_taxon <list>, type <list>,
#> #   has_gene <list>, deprecated <chr>
#> #
#> # Edge Data: 37 × 23
#>    from    to subject    predicate object primary_knowledge_so…¹ knowledge_level
#>   <int> <int> <chr>      <chr>     <chr>  <chr>                  <chr>          
#> 1     2     1 HGNC:8550  biolink:… GO:00… infores:mgi            knowledge_asse…
#> 2     3     4 HGNC:10414 biolink:… RGD:1… infores:panther        knowledge_asse…
#> 3     3     5 HGNC:10414 biolink:… GO:00… infores:uniprot        knowledge_asse…
#> # ℹ 34 more rows
#> # ℹ abbreviated name: ¹​primary_knowledge_source
#> # ℹ 16 more variables: negated <lgl>, original_subject <chr>,
#> #   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>,
#> #   qualifiers <list>, original_predicate <chr>, …