hklarner / pyboolnet

PyBoolNet is a Python package for the generation, modification and analysis of Boolean networks.
43 stars 21 forks source link

Attractors (bnet2primes_error) #41

Closed Domeniko70 closed 3 years ago

Domeniko70 commented 3 years ago

Dear Hannes, my problem now is to find attractors for my Boolen Network. My network consists of 104 nodes in which some of them have a number of inputs (activation and inhibition) between 20 and 30. After loading the network into the script, and starting processing to find attractors with: ..randomwalks_and_ctl ..compute_json ..AspSolver.trap_spaces after about 15 minutes of processing the following screen appears

TRAP_SPACE_1

for all three elaborations. Can you help me understand its meaning? Thanks for your help.

hklarner commented 3 years ago

i haven't seen this message before but it looks like you are running out of memory (bad_alloc).

my guess is that your network has too many attractors. What are you trying to achieve? Even a single node with 20 inputs nodes results in at least 1048576 attractors. Suppose you can enumerate all the attractors for your network. How would you use this information? How would you process this list? Maybe there is another way to answer your question. Otherwise, try turning inputs into constants by fixing their values, e.g., using

Domeniko70 commented 3 years ago

I made the changes you indicated without obtaining any different result from the previous one.

Answering your questions: “what are you trying to achive?” This network represents a modeling of laboratory values (RNA-Seq) related to breast cancer in different cell lines. Analyzing the attractors of the network represents the fundamental step for the study of the different phenotypes deriving from the different cell lines that we have ((different cell lines, different configuration of the input nodes / genes for each cell line, probably different attractors ..).

The answer at the question “How would you use this information?” it is necessary to try at least to quantify the answer sought.

Do you believe that the probable high number of attractors derives from the high number of inputs present in some nodes?

What should be the maximum number of inputs for each node of the net (approximately) in order to obtain a "tractable" number of attractors?

Thank you.

hklarner commented 3 years ago

I can understand that the first reflex after creating a network is asking "how many attractors does it have?" But if the network has more than even 5 input nodes the answer is simple: it has many attractors. Namely at leas 2^n with n the number of input nodes. But most likely it has even more. Here is a table with the lower bound of attractors for n:

n number of attractors
2 > 4
3 > 8
4 > 16
5 > 32
6 > 64
7 > 128
.. ..

So, if a network has more than 5 input nodes I would instead try to formulate temporal properties in CTL or LTL and use model checking software to answer these queries. An example of a temporal property that involves a node called Cyc5 would be

A = "Cyc5 = 0 in all attractors"

The network satisfies this property A if the CTL query "AG(EF(Cyc5 = 1))" is false.

Do you believe that the probable high number of attractors derives from the high number of inputs present in some nodes?

Certainly. This is just math. Each input node has two stable configurations and so each input node doubles the total number of attractors.

I made the changes you indicated without obtaining any different result from the previous one.

Without code its really hard to see what's going on. You are welcome to post your code and I can comment on it.

Domeniko70 commented 3 years ago

Hi, following the steps taken. First I loaded the "bnet" file directly into the python script.

I1

then I looked for the attractors with the "compute-json" function

I2

Note that I performed the exact same procedure with the "arellano_rootstem" file

l3

but in this case obtaining a positive result

l4

Thank you.