Skip to content

Commit

Permalink
minibn.BooleanNetwork: add save method
Browse files Browse the repository at this point in the history
  • Loading branch information
pauleve committed Sep 18, 2023
1 parent 8cc64c4 commit e22178f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions colomoto/minibn.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,13 @@ def to_pyboolnet(self):
finally:
os.unlink(bnetfile)

def save(self, filename):
"""
Write Boolean network to `filename` in BooleanNet format (`.bnet`)
"""
with open(filename, "w") as fp:
fp.write(self.source())

def dynamics(self, update_mode="asynchronous", init=None, loops=None):
"""
Returns a directed graph (`networkx.DiGraph` object) of the dynamics
Expand Down

0 comments on commit e22178f

Please sign in to comment.