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:  1123059 
#> Total edges:  8969089 
#> 
#> Node category counts:
#>                                      category   count
#>                            biolink:NamedThing 1123059
#>                                biolink:Entity 1123059
#>                        biolink:ThingWithTaxon 1080221
#>                      biolink:BiologicalEntity 1080221
#>            biolink:PhysicalEssenceOrOccurrent  876393
#>                       biolink:PhysicalEssence  811051
#>                         biolink:OntologyClass  786167
#>                         biolink:GenomicEntity  720825
#>     biolink:ChemicalEntityOrGeneOrGeneProduct  609877
#>            biolink:MacromolecularMachineMixin  592806
#>                     biolink:GeneOrGeneProduct  592806
#>                                  biolink:Gene  571154
#>            biolink:DiseaseOrPhenotypicFeature  198941
#>                     biolink:PhenotypicFeature  168951
#>                              biolink:Genotype  135567
#>                      biolink:OrganismalEntity   73461
#>                biolink:SubjectOfInvestigation   73461
#>                      biolink:AnatomicalEntity   73155
#>           biolink:BiologicalProcessOrActivity   65342
#>                             biolink:Occurrent   65342
#>                     biolink:BiologicalProcess   52688
#>  biolink:ChemicalEntityOrProteinOrPolypeptide   38723
#>                               biolink:Disease   29990
#>                               biolink:Pathway   21946
#>                      biolink:GeneProductMixin   21652
#>                           biolink:Polypeptide   21652
#>                               biolink:Protein   21652
#>                        biolink:ChemicalEntity   17071
#>             biolink:ChemicalOrDrugOrTreatment   17071
#>                       biolink:SequenceVariant   14104
#>                     biolink:MolecularActivity   12654
#>                     biolink:CellularComponent    4525
#>                                  biolink:Cell    3069
#>                         biolink:OrganismTaxon    1959
#>                       biolink:MolecularEntity     529
#>                             biolink:LifeStage     306
#> 
#> Edge type counts:
#>                                           predicate   count
#>                              biolink:interacts_with 2458186
#>                               biolink:has_phenotype 1489349
#>                                biolink:expressed_in 1233656
#>                              biolink:orthologous_to  696758
#>                        biolink:actively_involved_in  659514
#>                                 biolink:subclass_of  572463
#>                                     biolink:enables  455373
#>                                  biolink:related_to  385165
#>                                  biolink:located_in  317053
#>                             biolink:participates_in  273655
#>                                biolink:is_active_in  147062
#>                  biolink:acts_upstream_of_or_within  133021
#>                                     biolink:part_of   59011
#>                                      biolink:causes   15818
#>                      biolink:is_sequence_variant_of   14183
#>                                    biolink:model_of    9313
#>                     biolink:has_mode_of_inheritance    8616
#>       biolink:treats_or_applied_or_studied_to_treat    8616
#>              biolink:gene_associated_with_condition    8060
#>                            biolink:acts_upstream_of    7364
#>                              biolink:contributes_to    6376
#>                 biolink:genetically_associated_with    2924
#>                            biolink:colocalizes_with    2551
#>     biolink:associated_with_increased_likelihood_of    2388
#>                        biolink:disease_has_location    1016
#>            biolink:acts_upstream_of_positive_effect     493
#>  biolink:acts_upstream_of_or_within_positive_effect     453
#>                       biolink:ameliorates_condition     296
#>            biolink:acts_upstream_of_negative_effect     174
#>  biolink:acts_upstream_of_or_within_negative_effect     153
#>                  biolink:preventative_for_condition      28
#>                          biolink:contraindicated_in       1
print(stats)
#> $node_summary
#>                                        category   count
#> 1                            biolink:NamedThing 1123059
#> 2                                biolink:Entity 1123059
#> 3                        biolink:ThingWithTaxon 1080221
#> 4                      biolink:BiologicalEntity 1080221
#> 5            biolink:PhysicalEssenceOrOccurrent  876393
#> 6                       biolink:PhysicalEssence  811051
#> 7                         biolink:OntologyClass  786167
#> 8                         biolink:GenomicEntity  720825
#> 9     biolink:ChemicalEntityOrGeneOrGeneProduct  609877
#> 10           biolink:MacromolecularMachineMixin  592806
#> 11                    biolink:GeneOrGeneProduct  592806
#> 12                                 biolink:Gene  571154
#> 13           biolink:DiseaseOrPhenotypicFeature  198941
#> 14                    biolink:PhenotypicFeature  168951
#> 15                             biolink:Genotype  135567
#> 16                     biolink:OrganismalEntity   73461
#> 17               biolink:SubjectOfInvestigation   73461
#> 18                     biolink:AnatomicalEntity   73155
#> 19          biolink:BiologicalProcessOrActivity   65342
#> 20                            biolink:Occurrent   65342
#> 21                    biolink:BiologicalProcess   52688
#> 22 biolink:ChemicalEntityOrProteinOrPolypeptide   38723
#> 23                              biolink:Disease   29990
#> 24                              biolink:Pathway   21946
#> 25                     biolink:GeneProductMixin   21652
#> 26                          biolink:Polypeptide   21652
#> 27                              biolink:Protein   21652
#> 28                       biolink:ChemicalEntity   17071
#> 29            biolink:ChemicalOrDrugOrTreatment   17071
#> 30                      biolink:SequenceVariant   14104
#> 31                    biolink:MolecularActivity   12654
#> 32                    biolink:CellularComponent    4525
#> 33                                 biolink:Cell    3069
#> 34                        biolink:OrganismTaxon    1959
#> 35                      biolink:MolecularEntity     529
#> 36                            biolink:LifeStage     306
#> 
#> $edge_summary
#>                                             predicate   count
#> 1                              biolink:interacts_with 2458186
#> 2                               biolink:has_phenotype 1489349
#> 3                                biolink:expressed_in 1233656
#> 4                              biolink:orthologous_to  696758
#> 5                        biolink:actively_involved_in  659514
#> 6                                 biolink:subclass_of  572463
#> 7                                     biolink:enables  455373
#> 8                                  biolink:related_to  385165
#> 9                                  biolink:located_in  317053
#> 10                            biolink:participates_in  273655
#> 11                               biolink:is_active_in  147062
#> 12                 biolink:acts_upstream_of_or_within  133021
#> 13                                    biolink:part_of   59011
#> 14                                     biolink:causes   15818
#> 15                     biolink:is_sequence_variant_of   14183
#> 16                                   biolink:model_of    9313
#> 17                    biolink:has_mode_of_inheritance    8616
#> 18      biolink:treats_or_applied_or_studied_to_treat    8616
#> 19             biolink:gene_associated_with_condition    8060
#> 20                           biolink:acts_upstream_of    7364
#> 21                             biolink:contributes_to    6376
#> 22                biolink:genetically_associated_with    2924
#> 23                           biolink:colocalizes_with    2551
#> 24    biolink:associated_with_increased_likelihood_of    2388
#> 25                       biolink:disease_has_location    1016
#> 26           biolink:acts_upstream_of_positive_effect     493
#> 27 biolink:acts_upstream_of_or_within_positive_effect     453
#> 28                      biolink:ameliorates_condition     296
#> 29           biolink:acts_upstream_of_negative_effect     174
#> 30 biolink:acts_upstream_of_or_within_negative_effect     153
#> 31                 biolink:preventative_for_condition      28
#> 32                         biolink:contraindicated_in       1
#> 
#> $total_nodes
#> [1] 1123059
#> 
#> $total_edges
#> [1] 8969089
#> 
#> $cats
#> $cats$`biolink:NamedThing`
#> [1] "biolink:NamedThing"
#> 
#> $cats$`biolink:Entity`
#> [1] "biolink:Entity"
#> 
#> $cats$`biolink:ThingWithTaxon`
#> [1] "biolink:ThingWithTaxon"
#> 
#> $cats$`biolink:BiologicalEntity`
#> [1] "biolink:BiologicalEntity"
#> 
#> $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:MacromolecularMachineMixin`
#> [1] "biolink:MacromolecularMachineMixin"
#> 
#> $cats$`biolink:GeneOrGeneProduct`
#> [1] "biolink:GeneOrGeneProduct"
#> 
#> $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:OrganismalEntity`
#> [1] "biolink:OrganismalEntity"
#> 
#> $cats$`biolink:SubjectOfInvestigation`
#> [1] "biolink:SubjectOfInvestigation"
#> 
#> $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:Pathway`
#> [1] "biolink:Pathway"
#> 
#> $cats$`biolink:GeneProductMixin`
#> [1] "biolink:GeneProductMixin"
#> 
#> $cats$`biolink:Polypeptide`
#> [1] "biolink:Polypeptide"
#> 
#> $cats$`biolink:Protein`
#> [1] "biolink:Protein"
#> 
#> $cats$`biolink:ChemicalEntity`
#> [1] "biolink:ChemicalEntity"
#> 
#> $cats$`biolink:ChemicalOrDrugOrTreatment`
#> [1] "biolink:ChemicalOrDrugOrTreatment"
#> 
#> $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:has_mode_of_inheritance`
#> [1] "biolink:has_mode_of_inheritance"
#> 
#> $preds$`biolink:treats_or_applied_or_studied_to_treat`
#> [1] "biolink:treats_or_applied_or_studied_to_treat"
#> 
#> $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:acts_upstream_of_or_within_positive_effect`
#> [1] "biolink:acts_upstream_of_or_within_positive_effect"
#> 
#> $preds$`biolink:ameliorates_condition`
#> [1] "biolink:ameliorates_condition"
#> 
#> $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"
#> 
#>