From de72d003558777e17335808fe9964a61ba0d1a81 Mon Sep 17 00:00:00 2001 From: caufieldjh Date: Tue, 1 Oct 2024 14:37:34 -0400 Subject: [PATCH 1/3] Include total node count and edge counts in total_stats.yaml --- src/kg_bioportal/transformer.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/kg_bioportal/transformer.py b/src/kg_bioportal/transformer.py index b1db303..ab1e27f 100644 --- a/src/kg_bioportal/transformer.py +++ b/src/kg_bioportal/transformer.py @@ -119,12 +119,23 @@ def transform_all(self, compress: bool) -> None: # Write total stats to a yaml logging.info("Writing total stats to total_stats.yaml.") # Get the count of successful transforms + # Plus total node and edge counts success_count = 0 for onto in onto_log: if onto_log[onto]["status"]: success_count += 1 with open(os.path.join(self.output_dir, "total_stats.yaml"), "w") as f: f.write("totalcount: " + str(success_count) + "\n") + f.write( + "totalnodecount: " + + str(sum([onto_log[onto]["nodecount"] for onto in onto_log])) + + "\n" + ) + f.write( + "totaledgecount: " + + str(sum([onto_log[onto]["edgecount"] for onto in onto_log])) + + "\n" + ) # Dump onto_log to a yaml # Rearrange it a bit first From 626e32f40c32bcca4ed256767ed20722f8ced9bd Mon Sep 17 00:00:00 2001 From: caufieldjh Date: Tue, 1 Oct 2024 14:43:03 -0400 Subject: [PATCH 2/3] Add node and edge count fields to index --- docs/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index.html b/docs/index.html index d4d590b..31ea568 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,6 +15,8 @@

Learn more about KG-Bioportal

KG-Bioportal Overview

The collection includes graph files for {{ site.totalcount }} ontologies.

+

In all, this includes {{site.totalnodecount }} ontology classes as nodes and {{site.totaledgecount}} relations between classes as edges.

+ {% include fig1.html %} {% include fig2.html %}
From 846754d1e53c021fb4a4999047772b65988fbbff Mon Sep 17 00:00:00 2001 From: caufieldjh Date: Tue, 1 Oct 2024 14:45:03 -0400 Subject: [PATCH 3/3] Update site config --- docs/_config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_config.yml b/docs/_config.yml index f119c1f..497c0ec 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -53,6 +53,8 @@ plugins: # Ontology status table goes under here. totalcount: 1050 +totalnodecount: 10509205 +totaledgecount: 20055264 ontologies: - edgecount: 555 id: REGN_BRO