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: 68 nodes and 41 edges
#> #
#> # A directed acyclic simple graph with 30 components
#> #
#> # Node Data: 68 × 17 (active)
#>    id     category pcategory name  symbol description synonym full_name in_taxon
#>    <chr>  <list>   <chr>     <chr> <chr>  <chr>       <named> <chr>     <named >
#>  1 NCBIG… <chr>    biolink:… ATP5… ATP5F… ATP syntha… <lgl>   ATP synt… <chr>   
#>  2 GO:19… <chr>    biolink:… prot… NA     The direct… <chr>   NA        <lgl>   
#>  3 dicty… <chr>    biolink:… psmA3 psmA3  NA          <lgl>   psmA3     <chr>   
#>  4 Xenba… <chr>    biolink:… psma3 psma3  NA          <chr>   proteaso… <chr>   
#>  5 GO:00… <chr>    biolink:… spli… NA     Any of a s… <chr>   NA        <lgl>   
#>  6 NCBIG… <chr>    biolink:… SNRN… SNRNP… small nucl… <lgl>   small nu… <chr>   
#>  7 GO:00… <chr>    biolink:… posi… NA     Any proces… <chr>   NA        <lgl>   
#>  8 NCBIG… <chr>    biolink:… TEK   TEK    TEK recept… <lgl>   TEK rece… <chr>   
#>  9 MONDO… <chr>    biolink:… over… NA     A disease … <chr>   NA        <lgl>   
#> 10 CLINV… <chr>    biolink:… NM_0… NA     NA          <lgl>   NA        <chr>   
#> # ℹ 58 more rows
#> # ℹ 8 more variables: namespace <chr>, provided_by <named list>, iri <chr>,
#> #   in_taxon_label <chr>, xref <named list>, type <named list>,
#> #   has_gene <named list>, deprecated <chr>
#> #
#> # Edge Data: 41 × 22
#>    from    to subject                predicate    object knowledge_level negated
#>   <int> <int> <chr>                  <chr>        <chr>  <chr>           <lgl>  
#> 1     1     2 NCBIGene:338081        biolink:act… GO:19… knowledge_asse… TRUE   
#> 2     4     3 Xenbase:XB-GENE-976787 biolink:ort… dicty… knowledge_asse… NA     
#> 3     6     5 NCBIGene:535113        biolink:par… GO:00… knowledge_asse… TRUE   
#> # ℹ 38 more rows
#> # ℹ 15 more variables: primary_knowledge_source <chr>, original_subject <chr>,
#> #   species_context_qualifier <chr>, agent_type <chr>, knowledge_source <chr>,
#> #   aggregator_knowledge_source <named list>, has_evidence <named list>,
#> #   provided_by <named list>, id <chr>, category <named list>,
#> #   publications <named list>, qualifiers <named list>,
#> #   original_predicate <chr>, disease_context_qualifier <chr>, …