Skip to content

Commit

Permalink
Add a script to count the number of regulations, variables and non-co…
Browse files Browse the repository at this point in the history
…nstant variables.
  • Loading branch information
daemontus committed Sep 24, 2024
1 parent 47e1128 commit 1037bf8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions k_count.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 1037bf8

Please sign in to comment.