From 1037bf8e8972ad9b477dbf5754692046e6a5b1a1 Mon Sep 17 00:00:00 2001 From: Samuel Pastva Date: Tue, 24 Sep 2024 10:50:44 +0200 Subject: [PATCH] Add a script to count the number of regulations, variables and non-constant variables. --- k_count.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 k_count.py diff --git a/k_count.py b/k_count.py new file mode 100644 index 0000000..0f5694f --- /dev/null +++ b/k_count.py @@ -0,0 +1,22 @@ +import os +from biodivine_aeon import * + +# This script counts the total number of variables, +# regulators, and variables that are not inputs/constants. + +total_regulations = 0 +total_variables = 0 +total_non_inputs = 0 +for file in os.listdir('./sbml-true'): + if not file.endswith('.sbml'): + continue + bn = BooleanNetwork.from_file('./sbml-true/'+file) + for var in bn.variables(): + total_variables += 1 + regs = bn.regulators(var) + total_regulations += len(regs) + if len(regs) > 0: + total_non_inputs += 1 +print(total_regulations) +print(total_variables) +print(total_non_inputs) \ No newline at end of file