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:  1128872 
#> Total edges:  9432564 
#> 
#> Node category counts:
#>                                      category   count
#>                                biolink:Entity 1128872
#>                            biolink:NamedThing 1128872
#>                        biolink:ThingWithTaxon 1076490
#>                      biolink:BiologicalEntity 1076490
#>            biolink:PhysicalEssenceOrOccurrent  876727
#>                       biolink:PhysicalEssence  811322
#>                         biolink:OntologyClass  780621
#>                         biolink:GenomicEntity  715216
#>     biolink:ChemicalEntityOrGeneOrGeneProduct  609150
#>                     biolink:GeneOrGeneProduct  586392
#>            biolink:MacromolecularMachineMixin  586392
#>                                  biolink:Gene  563625
#>            biolink:DiseaseOrPhenotypicFeature  199440
#>                     biolink:PhenotypicFeature  169147
#>                              biolink:Genotype  136735
#>                      biolink:OrganismalEntity   73662
#>                biolink:SubjectOfInvestigation   73662
#>                      biolink:AnatomicalEntity   73348
#>                             biolink:Occurrent   65405
#>           biolink:BiologicalProcessOrActivity   65405
#>                     biolink:BiologicalProcess   52702
#>  biolink:ChemicalEntityOrProteinOrPolypeptide   45525
#>                               biolink:Disease   30293
#>                           biolink:Polypeptide   22767
#>                               biolink:Protein   22767
#>                      biolink:GeneProductMixin   22767
#>                        biolink:ChemicalEntity   22758
#>             biolink:ChemicalOrDrugOrTreatment   22758
#>                               biolink:Pathway   21946
#>                       biolink:SequenceVariant   14856
#>                     biolink:MolecularActivity   12703
#>                     biolink:CellularComponent    4536
#>                                  biolink:Cell    3136
#>                         biolink:OrganismTaxon    1982
#>                       biolink:MolecularEntity     529
#>                             biolink:LifeStage     314
#> 
#> Edge type counts:
#>                                           predicate   count
#>                              biolink:interacts_with 2480332
#>                               biolink:has_phenotype 1494613
#>                                biolink:expressed_in 1228812
#>                              biolink:orthologous_to 1067896
#>                        biolink:actively_involved_in  642840
#>                                 biolink:subclass_of  607367
#>                                     biolink:enables  452649
#>                                  biolink:related_to  404848
#>                                  biolink:located_in  315774
#>                             biolink:participates_in  288255
#>                                biolink:is_active_in  148277
#>                  biolink:acts_upstream_of_or_within  142265
#>                                     biolink:part_of   57892
#>       biolink:treats_or_applied_or_studied_to_treat   18846
#>                                      biolink:causes   16051
#>                      biolink:is_sequence_variant_of   14981
#>                                    biolink:model_of    9357
#>                     biolink:has_mode_of_inheritance    8616
#>              biolink:gene_associated_with_condition    8047
#>                            biolink:acts_upstream_of    7414
#>                              biolink:contributes_to    6241
#>                 biolink:genetically_associated_with    3242
#>     biolink:associated_with_increased_likelihood_of    2584
#>                            biolink:colocalizes_with    2499
#>                        biolink:disease_has_location    1016
#>            biolink:acts_upstream_of_positive_effect     490
#>                       biolink:ameliorates_condition     485
#>  biolink:acts_upstream_of_or_within_positive_effect     457
#>            biolink:acts_upstream_of_negative_effect     173
#>  biolink:acts_upstream_of_or_within_negative_effect     156
#>                  biolink:preventative_for_condition      86
#>                          biolink:contraindicated_in       3
print(stats)
#> $node_summary
#>                                        category   count
#> 1                                biolink:Entity 1128872
#> 2                            biolink:NamedThing 1128872
#> 3                        biolink:ThingWithTaxon 1076490
#> 4                      biolink:BiologicalEntity 1076490
#> 5            biolink:PhysicalEssenceOrOccurrent  876727
#> 6                       biolink:PhysicalEssence  811322
#> 7                         biolink:OntologyClass  780621
#> 8                         biolink:GenomicEntity  715216
#> 9     biolink:ChemicalEntityOrGeneOrGeneProduct  609150
#> 10                    biolink:GeneOrGeneProduct  586392
#> 11           biolink:MacromolecularMachineMixin  586392
#> 12                                 biolink:Gene  563625
#> 13           biolink:DiseaseOrPhenotypicFeature  199440
#> 14                    biolink:PhenotypicFeature  169147
#> 15                             biolink:Genotype  136735
#> 16                     biolink:OrganismalEntity   73662
#> 17               biolink:SubjectOfInvestigation   73662
#> 18                     biolink:AnatomicalEntity   73348
#> 19                            biolink:Occurrent   65405
#> 20          biolink:BiologicalProcessOrActivity   65405
#> 21                    biolink:BiologicalProcess   52702
#> 22 biolink:ChemicalEntityOrProteinOrPolypeptide   45525
#> 23                              biolink:Disease   30293
#> 24                          biolink:Polypeptide   22767
#> 25                              biolink:Protein   22767
#> 26                     biolink:GeneProductMixin   22767
#> 27                       biolink:ChemicalEntity   22758
#> 28            biolink:ChemicalOrDrugOrTreatment   22758
#> 29                              biolink:Pathway   21946
#> 30                      biolink:SequenceVariant   14856
#> 31                    biolink:MolecularActivity   12703
#> 32                    biolink:CellularComponent    4536
#> 33                                 biolink:Cell    3136
#> 34                        biolink:OrganismTaxon    1982
#> 35                      biolink:MolecularEntity     529
#> 36                            biolink:LifeStage     314
#> 
#> $edge_summary
#>                                             predicate   count
#> 1                              biolink:interacts_with 2480332
#> 2                               biolink:has_phenotype 1494613
#> 3                                biolink:expressed_in 1228812
#> 4                              biolink:orthologous_to 1067896
#> 5                        biolink:actively_involved_in  642840
#> 6                                 biolink:subclass_of  607367
#> 7                                     biolink:enables  452649
#> 8                                  biolink:related_to  404848
#> 9                                  biolink:located_in  315774
#> 10                            biolink:participates_in  288255
#> 11                               biolink:is_active_in  148277
#> 12                 biolink:acts_upstream_of_or_within  142265
#> 13                                    biolink:part_of   57892
#> 14      biolink:treats_or_applied_or_studied_to_treat   18846
#> 15                                     biolink:causes   16051
#> 16                     biolink:is_sequence_variant_of   14981
#> 17                                   biolink:model_of    9357
#> 18                    biolink:has_mode_of_inheritance    8616
#> 19             biolink:gene_associated_with_condition    8047
#> 20                           biolink:acts_upstream_of    7414
#> 21                             biolink:contributes_to    6241
#> 22                biolink:genetically_associated_with    3242
#> 23    biolink:associated_with_increased_likelihood_of    2584
#> 24                           biolink:colocalizes_with    2499
#> 25                       biolink:disease_has_location    1016
#> 26           biolink:acts_upstream_of_positive_effect     490
#> 27                      biolink:ameliorates_condition     485
#> 28 biolink:acts_upstream_of_or_within_positive_effect     457
#> 29           biolink:acts_upstream_of_negative_effect     173
#> 30 biolink:acts_upstream_of_or_within_negative_effect     156
#> 31                 biolink:preventative_for_condition      86
#> 32                         biolink:contraindicated_in       3
#> 
#> $total_nodes
#> [1] 1128872
#> 
#> $total_edges
#> [1] 9432564
#> 
#> $cats
#> $cats$`biolink:Entity`
#> [1] "biolink:Entity"
#> 
#> $cats$`biolink:NamedThing`
#> [1] "biolink:NamedThing"
#> 
#> $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: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:OrganismalEntity`
#> [1] "biolink:OrganismalEntity"
#> 
#> $cats$`biolink:SubjectOfInvestigation`
#> [1] "biolink:SubjectOfInvestigation"
#> 
#> $cats$`biolink:AnatomicalEntity`
#> [1] "biolink:AnatomicalEntity"
#> 
#> $cats$`biolink:Occurrent`
#> [1] "biolink:Occurrent"
#> 
#> $cats$`biolink:BiologicalProcessOrActivity`
#> [1] "biolink:BiologicalProcessOrActivity"
#> 
#> $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:ChemicalEntity`
#> [1] "biolink:ChemicalEntity"
#> 
#> $cats$`biolink:ChemicalOrDrugOrTreatment`
#> [1] "biolink:ChemicalOrDrugOrTreatment"
#> 
#> $cats$`biolink:Pathway`
#> [1] "biolink:Pathway"
#> 
#> $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:treats_or_applied_or_studied_to_treat`
#> [1] "biolink:treats_or_applied_or_studied_to_treat"
#> 
#> $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: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:associated_with_increased_likelihood_of`
#> [1] "biolink:associated_with_increased_likelihood_of"
#> 
#> $preds$`biolink:colocalizes_with`
#> [1] "biolink:colocalizes_with"
#> 
#> $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"
#> 
#>