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: 87 nodes and 45 edges
#> #
#> # A rooted forest with 42 trees
#> #
#> # Node Data: 87 × 23 (active)
#>    id         category pcategory name  symbol in_taxon_label description synonym
#>    <chr>      <list>   <chr>     <chr> <chr>  <chr>          <chr>       <list> 
#>  1 GO:0007020 <chr>    biolink:… micr… NA     NA             The proces… <lgl>  
#>  2 SGD:S0000… <chr>    biolink:… KIP3  KIP3   NCBITaxon:559… NA          <list> 
#>  3 NCBIGene:… <chr>    biolink:… ORMD… ORMDL2 Gallus gallus  ORMDL sphi… <lgl>  
#>  4 NCBIGene:… <chr>    biolink:… ORMD… ORMDL2 Canis lupus f… ORMDL sphi… <lgl>  
#>  5 SGD:S0000… <chr>    biolink:… MCM6  MCM6   NCBITaxon:559… NA          <list> 
#>  6 GO:0005656 <chr>    biolink:… nucl… NA     NA             A protein-… <list> 
#>  7 HGNC:27009 <chr>    biolink:… CIMA… CIMAP3 Homo sapiens   NA          <list> 
#>  8 GO:0044782 <chr>    biolink:… cili… NA     NA             A process … <list> 
#>  9 ZFIN:ZDB-… <chr>    biolink:… s101… NA     Danio rerio    NA          <lgl>  
#> 10 ZFIN:ZDB-… <chr>    biolink:… s101… NA     Danio rerio    NA          <lgl>  
#> # ℹ 77 more rows
#> # ℹ 15 more variables: iri <chr>, xref <list>, namespace <chr>,
#> #   provided_by <chr>, file_source <chr>, in_taxon <chr>, type <chr>,
#> #   full_name <chr>, exact_synonym <list>, broad_synonym <list>,
#> #   related_synonym <list>, subsets <chr>, narrow_synonym <list>,
#> #   has_biological_sex <chr>, has_gene <list>
#> #
#> # Edge Data: 45 × 29
#>    from    to subject    predicate object primary_knowledge_so…¹ knowledge_level
#>   <int> <int> <chr>      <chr>     <chr>  <chr>                  <chr>          
#> 1     2     1 SGD:S0000… biolink:… GO:00… infores:sgd            knowledge_asse…
#> 2     4     3 NCBIGene:… biolink:… NCBIG… infores:panther        knowledge_asse…
#> 3     5     6 SGD:S0000… biolink:… GO:00… infores:uniprot        knowledge_asse…
#> # ℹ 42 more rows
#> # ℹ abbreviated name: ¹​primary_knowledge_source
#> # ℹ 22 more variables: negated <lgl>, file_source <chr>,
#> #   species_context_qualifier <chr>, agent_type <chr>,
#> #   aggregator_knowledge_source <list>, has_evidence <list>, provided_by <chr>,
#> #   id <chr>, category <list>, publications <list>, original_subject <chr>,
#> #   original_object <chr>, qualifier <chr>, original_predicate <chr>, …