jcrozum / pystablemotifs

Python library for attractor identification and control in Boolean networks
MIT License
28 stars 7 forks source link

Making rule input more user-friendly #77

Open kyuhyongpark opened 2 years ago

kyuhyongpark commented 2 years ago

While adding new parameter max_in_degree to the deletionreduction in reduction.py, I found that this function does not allow node names that have or - or start with numbers.

I think it is related to simplify_using_expression_and_negation in reduction.py.

kyuhyongpark commented 2 years ago

Right now there is no documentation or warning. User won't be notified that certain node names are not allowed unless the deletion reduction actually happens.

kyuhyongpark commented 2 years ago

Another issue with the input rules is that it does not allow rules that do not have an empty space between not and (. For example A* = not(B or C) cannot be imported and there is no warning or error message that tells the user why.

jcrozum commented 2 years ago

The second issue, with the A*=not(B or C) should be easy enough to fix. Are you sure underscores cause an issue? I knew about the hyphen because sympy interprets it as a minus sign, but I was pretty certain we had tested with underscores. In any case, I agree that this kind of thing needs to be better documented.