Given a Neo4j based KG engine, provides summary information in the form of node counts, category counts across nodes, and relationship type counts. General information about the graph is printed to the console, and a list of dataframes describing node and edge counts is returned invisibly. Also returned are cats and preds entries, containing lists of available node categories and edge predicates, respectively, for convenient auto-completion in RStudio.

# S3 method for class 'neo4j_engine'
summary(object, ..., quiet = FALSE)

Arguments

object

A neo4j_engine object

...

Other parameters (not used)

quiet

Logical, whether to suppress printing of the summary

Value

A list of dataframes and named lists

Examples

# prints a readable summary and returns a list of dataframes
stats <- monarch_engine() |> summary()
#> Trying to connect to https://neo4j.monarchinitiative.org
#> Connected to https://neo4j.monarchinitiative.org
#> 
#> A Neo4j-backed knowledge graph engine.
#> Gathering statistics, please wait...
#> Total nodes:  1124572 
#> Total edges:  9394432 
#> 
#> Node category counts:
#>                                      category   count
#>                            biolink:NamedThing 1124572
#>                                biolink:Entity 1124572
#>                      biolink:BiologicalEntity 1077862
#>                        biolink:ThingWithTaxon 1077862
#>            biolink:PhysicalEssenceOrOccurrent  870252
#>                       biolink:PhysicalEssence  804910
#>                         biolink:OntologyClass  779947
#>                         biolink:GenomicEntity  714605
#>     biolink:ChemicalEntityOrGeneOrGeneProduct  605779
#>                     biolink:GeneOrGeneProduct  588713
#>            biolink:MacromolecularMachineMixin  588713
#>                                  biolink:Gene  563624
#>            biolink:DiseaseOrPhenotypicFeature  199273
#>                     biolink:PhenotypicFeature  169051
#>                              biolink:Genotype  136237
#>                biolink:SubjectOfInvestigation   73553
#>                      biolink:OrganismalEntity   73553
#>                      biolink:AnatomicalEntity   73239
#>           biolink:BiologicalProcessOrActivity   65342
#>                             biolink:Occurrent   65342
#>                     biolink:BiologicalProcess   52688
#>  biolink:ChemicalEntityOrProteinOrPolypeptide   42155
#>                               biolink:Disease   30222
#>                           biolink:Polypeptide   25089
#>                               biolink:Protein   25089
#>                      biolink:GeneProductMixin   25089
#>                               biolink:Pathway   21946
#>             biolink:ChemicalOrDrugOrTreatment   17066
#>                        biolink:ChemicalEntity   17066
#>                       biolink:SequenceVariant   14744
#>                     biolink:MolecularActivity   12654
#>                     biolink:CellularComponent    4525
#>                                  biolink:Cell    3122
#>                         biolink:OrganismTaxon    1974
#>                       biolink:MolecularEntity     529
#>                             biolink:LifeStage     314
#> 
#> Edge type counts:
#>                                           predicate   count
#>                              biolink:interacts_with 2480332
#>                               biolink:has_phenotype 1492755
#>                                biolink:expressed_in 1228812
#>                              biolink:orthologous_to 1067913
#>                        biolink:actively_involved_in  659331
#>                                 biolink:subclass_of  593050
#>                                     biolink:enables  455769
#>                                  biolink:related_to  393758
#>                                  biolink:located_in  317598
#>                             biolink:participates_in  275046
#>                                biolink:is_active_in  146927
#>                  biolink:acts_upstream_of_or_within  133635
#>                                     biolink:part_of   59047
#>                                      biolink:causes   16019
#>                      biolink:is_sequence_variant_of   14873
#>                                    biolink:model_of    9339
#>       biolink:treats_or_applied_or_studied_to_treat    8634
#>                     biolink:has_mode_of_inheritance    8616
#>              biolink:gene_associated_with_condition    8047
#>                            biolink:acts_upstream_of    7385
#>                              biolink:contributes_to    6382
#>                 biolink:genetically_associated_with    3203
#>                            biolink:colocalizes_with    2549
#>     biolink:associated_with_increased_likelihood_of    2544
#>                        biolink:disease_has_location    1016
#>            biolink:acts_upstream_of_positive_effect     493
#>                       biolink:ameliorates_condition     485
#>  biolink:acts_upstream_of_or_within_positive_effect     457
#>            biolink:acts_upstream_of_negative_effect     174
#>  biolink:acts_upstream_of_or_within_negative_effect     154
#>                  biolink:preventative_for_condition      86
#>                          biolink:contraindicated_in       3
print(stats)
#> $node_summary
#>                                        category   count
#> 1                            biolink:NamedThing 1124572
#> 2                                biolink:Entity 1124572
#> 3                      biolink:BiologicalEntity 1077862
#> 4                        biolink:ThingWithTaxon 1077862
#> 5            biolink:PhysicalEssenceOrOccurrent  870252
#> 6                       biolink:PhysicalEssence  804910
#> 7                         biolink:OntologyClass  779947
#> 8                         biolink:GenomicEntity  714605
#> 9     biolink:ChemicalEntityOrGeneOrGeneProduct  605779
#> 10                    biolink:GeneOrGeneProduct  588713
#> 11           biolink:MacromolecularMachineMixin  588713
#> 12                                 biolink:Gene  563624
#> 13           biolink:DiseaseOrPhenotypicFeature  199273
#> 14                    biolink:PhenotypicFeature  169051
#> 15                             biolink:Genotype  136237
#> 16               biolink:SubjectOfInvestigation   73553
#> 17                     biolink:OrganismalEntity   73553
#> 18                     biolink:AnatomicalEntity   73239
#> 19          biolink:BiologicalProcessOrActivity   65342
#> 20                            biolink:Occurrent   65342
#> 21                    biolink:BiologicalProcess   52688
#> 22 biolink:ChemicalEntityOrProteinOrPolypeptide   42155
#> 23                              biolink:Disease   30222
#> 24                          biolink:Polypeptide   25089
#> 25                              biolink:Protein   25089
#> 26                     biolink:GeneProductMixin   25089
#> 27                              biolink:Pathway   21946
#> 28            biolink:ChemicalOrDrugOrTreatment   17066
#> 29                       biolink:ChemicalEntity   17066
#> 30                      biolink:SequenceVariant   14744
#> 31                    biolink:MolecularActivity   12654
#> 32                    biolink:CellularComponent    4525
#> 33                                 biolink:Cell    3122
#> 34                        biolink:OrganismTaxon    1974
#> 35                      biolink:MolecularEntity     529
#> 36                            biolink:LifeStage     314
#> 
#> $edge_summary
#>                                             predicate   count
#> 1                              biolink:interacts_with 2480332
#> 2                               biolink:has_phenotype 1492755
#> 3                                biolink:expressed_in 1228812
#> 4                              biolink:orthologous_to 1067913
#> 5                        biolink:actively_involved_in  659331
#> 6                                 biolink:subclass_of  593050
#> 7                                     biolink:enables  455769
#> 8                                  biolink:related_to  393758
#> 9                                  biolink:located_in  317598
#> 10                            biolink:participates_in  275046
#> 11                               biolink:is_active_in  146927
#> 12                 biolink:acts_upstream_of_or_within  133635
#> 13                                    biolink:part_of   59047
#> 14                                     biolink:causes   16019
#> 15                     biolink:is_sequence_variant_of   14873
#> 16                                   biolink:model_of    9339
#> 17      biolink:treats_or_applied_or_studied_to_treat    8634
#> 18                    biolink:has_mode_of_inheritance    8616
#> 19             biolink:gene_associated_with_condition    8047
#> 20                           biolink:acts_upstream_of    7385
#> 21                             biolink:contributes_to    6382
#> 22                biolink:genetically_associated_with    3203
#> 23                           biolink:colocalizes_with    2549
#> 24    biolink:associated_with_increased_likelihood_of    2544
#> 25                       biolink:disease_has_location    1016
#> 26           biolink:acts_upstream_of_positive_effect     493
#> 27                      biolink:ameliorates_condition     485
#> 28 biolink:acts_upstream_of_or_within_positive_effect     457
#> 29           biolink:acts_upstream_of_negative_effect     174
#> 30 biolink:acts_upstream_of_or_within_negative_effect     154
#> 31                 biolink:preventative_for_condition      86
#> 32                         biolink:contraindicated_in       3
#> 
#> $total_nodes
#> [1] 1124572
#> 
#> $total_edges
#> [1] 9394432
#> 
#> $cats
#> $cats$`biolink:NamedThing`
#> [1] "biolink:NamedThing"
#> 
#> $cats$`biolink:Entity`
#> [1] "biolink:Entity"
#> 
#> $cats$`biolink:BiologicalEntity`
#> [1] "biolink:BiologicalEntity"
#> 
#> $cats$`biolink:ThingWithTaxon`
#> [1] "biolink:ThingWithTaxon"
#> 
#> $cats$`biolink:PhysicalEssenceOrOccurrent`
#> [1] "biolink:PhysicalEssenceOrOccurrent"
#> 
#> $cats$`biolink:PhysicalEssence`
#> [1] "biolink:PhysicalEssence"
#> 
#> $cats$`biolink:OntologyClass`
#> [1] "biolink:OntologyClass"
#> 
#> $cats$`biolink:GenomicEntity`
#> [1] "biolink:GenomicEntity"
#> 
#> $cats$`biolink:ChemicalEntityOrGeneOrGeneProduct`
#> [1] "biolink:ChemicalEntityOrGeneOrGeneProduct"
#> 
#> $cats$`biolink:GeneOrGeneProduct`
#> [1] "biolink:GeneOrGeneProduct"
#> 
#> $cats$`biolink:MacromolecularMachineMixin`
#> [1] "biolink:MacromolecularMachineMixin"
#> 
#> $cats$`biolink:Gene`
#> [1] "biolink:Gene"
#> 
#> $cats$`biolink:DiseaseOrPhenotypicFeature`
#> [1] "biolink:DiseaseOrPhenotypicFeature"
#> 
#> $cats$`biolink:PhenotypicFeature`
#> [1] "biolink:PhenotypicFeature"
#> 
#> $cats$`biolink:Genotype`
#> [1] "biolink:Genotype"
#> 
#> $cats$`biolink:SubjectOfInvestigation`
#> [1] "biolink:SubjectOfInvestigation"
#> 
#> $cats$`biolink:OrganismalEntity`
#> [1] "biolink:OrganismalEntity"
#> 
#> $cats$`biolink:AnatomicalEntity`
#> [1] "biolink:AnatomicalEntity"
#> 
#> $cats$`biolink:BiologicalProcessOrActivity`
#> [1] "biolink:BiologicalProcessOrActivity"
#> 
#> $cats$`biolink:Occurrent`
#> [1] "biolink:Occurrent"
#> 
#> $cats$`biolink:BiologicalProcess`
#> [1] "biolink:BiologicalProcess"
#> 
#> $cats$`biolink:ChemicalEntityOrProteinOrPolypeptide`
#> [1] "biolink:ChemicalEntityOrProteinOrPolypeptide"
#> 
#> $cats$`biolink:Disease`
#> [1] "biolink:Disease"
#> 
#> $cats$`biolink:Polypeptide`
#> [1] "biolink:Polypeptide"
#> 
#> $cats$`biolink:Protein`
#> [1] "biolink:Protein"
#> 
#> $cats$`biolink:GeneProductMixin`
#> [1] "biolink:GeneProductMixin"
#> 
#> $cats$`biolink:Pathway`
#> [1] "biolink:Pathway"
#> 
#> $cats$`biolink:ChemicalOrDrugOrTreatment`
#> [1] "biolink:ChemicalOrDrugOrTreatment"
#> 
#> $cats$`biolink:ChemicalEntity`
#> [1] "biolink:ChemicalEntity"
#> 
#> $cats$`biolink:SequenceVariant`
#> [1] "biolink:SequenceVariant"
#> 
#> $cats$`biolink:MolecularActivity`
#> [1] "biolink:MolecularActivity"
#> 
#> $cats$`biolink:CellularComponent`
#> [1] "biolink:CellularComponent"
#> 
#> $cats$`biolink:Cell`
#> [1] "biolink:Cell"
#> 
#> $cats$`biolink:OrganismTaxon`
#> [1] "biolink:OrganismTaxon"
#> 
#> $cats$`biolink:MolecularEntity`
#> [1] "biolink:MolecularEntity"
#> 
#> $cats$`biolink:LifeStage`
#> [1] "biolink:LifeStage"
#> 
#> 
#> $preds
#> $preds$`biolink:interacts_with`
#> [1] "biolink:interacts_with"
#> 
#> $preds$`biolink:has_phenotype`
#> [1] "biolink:has_phenotype"
#> 
#> $preds$`biolink:expressed_in`
#> [1] "biolink:expressed_in"
#> 
#> $preds$`biolink:orthologous_to`
#> [1] "biolink:orthologous_to"
#> 
#> $preds$`biolink:actively_involved_in`
#> [1] "biolink:actively_involved_in"
#> 
#> $preds$`biolink:subclass_of`
#> [1] "biolink:subclass_of"
#> 
#> $preds$`biolink:enables`
#> [1] "biolink:enables"
#> 
#> $preds$`biolink:related_to`
#> [1] "biolink:related_to"
#> 
#> $preds$`biolink:located_in`
#> [1] "biolink:located_in"
#> 
#> $preds$`biolink:participates_in`
#> [1] "biolink:participates_in"
#> 
#> $preds$`biolink:is_active_in`
#> [1] "biolink:is_active_in"
#> 
#> $preds$`biolink:acts_upstream_of_or_within`
#> [1] "biolink:acts_upstream_of_or_within"
#> 
#> $preds$`biolink:part_of`
#> [1] "biolink:part_of"
#> 
#> $preds$`biolink:causes`
#> [1] "biolink:causes"
#> 
#> $preds$`biolink:is_sequence_variant_of`
#> [1] "biolink:is_sequence_variant_of"
#> 
#> $preds$`biolink:model_of`
#> [1] "biolink:model_of"
#> 
#> $preds$`biolink:treats_or_applied_or_studied_to_treat`
#> [1] "biolink:treats_or_applied_or_studied_to_treat"
#> 
#> $preds$`biolink:has_mode_of_inheritance`
#> [1] "biolink:has_mode_of_inheritance"
#> 
#> $preds$`biolink:gene_associated_with_condition`
#> [1] "biolink:gene_associated_with_condition"
#> 
#> $preds$`biolink:acts_upstream_of`
#> [1] "biolink:acts_upstream_of"
#> 
#> $preds$`biolink:contributes_to`
#> [1] "biolink:contributes_to"
#> 
#> $preds$`biolink:genetically_associated_with`
#> [1] "biolink:genetically_associated_with"
#> 
#> $preds$`biolink:colocalizes_with`
#> [1] "biolink:colocalizes_with"
#> 
#> $preds$`biolink:associated_with_increased_likelihood_of`
#> [1] "biolink:associated_with_increased_likelihood_of"
#> 
#> $preds$`biolink:disease_has_location`
#> [1] "biolink:disease_has_location"
#> 
#> $preds$`biolink:acts_upstream_of_positive_effect`
#> [1] "biolink:acts_upstream_of_positive_effect"
#> 
#> $preds$`biolink:ameliorates_condition`
#> [1] "biolink:ameliorates_condition"
#> 
#> $preds$`biolink:acts_upstream_of_or_within_positive_effect`
#> [1] "biolink:acts_upstream_of_or_within_positive_effect"
#> 
#> $preds$`biolink:acts_upstream_of_negative_effect`
#> [1] "biolink:acts_upstream_of_negative_effect"
#> 
#> $preds$`biolink:acts_upstream_of_or_within_negative_effect`
#> [1] "biolink:acts_upstream_of_or_within_negative_effect"
#> 
#> $preds$`biolink:preventative_for_condition`
#> [1] "biolink:preventative_for_condition"
#> 
#> $preds$`biolink:contraindicated_in`
#> [1] "biolink:contraindicated_in"
#> 
#>