jcrozum / pystablemotifs

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

MPBN #75

Closed yzongy closed 2 years ago

yzongy commented 2 years ago

Hi Jordan,

Another task for me is to detect actractors on a genome-scale network: processed_BottomStrain_GRNbased.txt

So that I set the MPBN_update parameter as True, which I assume is a quick solution for searching attractors.

print("finding attractors")
max_simulate_size=7
ar = sm.AttractorRepertoire.from_primes(primes, max_simulate_size=max_simulate_size,max_stable_motifs=10000,MPBN_update=True)

But in fact, it did not finish overnight on my Mac though it is said that MPBN is designed for genome-scale networks.

Just wondering if I missed something?

Best,

Bill

jcrozum commented 2 years ago

Hi Bill,

The MPBN_update=True parameter does indeed speed things up considerable (it also has some implications for how you interpret the dynamics). However, it is possible that this network, for whatever reason, is especially tricky.

Is this the same network you already did the control analysis for? If so, maybe you should try pyboolnet.compute_trap_spaces(primes,"min"). This will give you a list of dictionaries; each describes an attractor in terms of which variable values are fixed. In the MPBN update, these are guaranteed to be all of the attractors with no extras. The downside to using this function is that it just gives you the attractors and nothing else, whereas the AttractorRepertoire will give you a bunch of extra information about which circuits determine which attractor is selected and about how to do efficient control. But if you don't need that information, the pyboolnet.compute_trap_spaces(primes,"min") command will probably be faster.

yzongy commented 2 years ago

Yes Jordan! pyboolnet.compute_trap_spaces(primes,"min") is what I was looking for. As you said in #76, pyboolnet.compute_trap_spaces(primes,"min") will pair well with a pystablemotifs function that can find controlling strategies with a given attractor but without calculating all possible attractors. This will be a good solution to figure out approaches to drive large scale Boolean networks. Thanks again!

yzongy commented 2 years ago

Just being curious, though my question has been solved, is there a way to estimate how much time will it take to find attractors with a given large network like the one in this post? Or do we know if it is possible to complete the following script within a reasonable time? sm.AttractorRepertoire.from_primes(primes,max_simulate_size=max_simulate_size,max_stable_motifs=10000,MPBN_update=True)

jcrozum commented 2 years ago

Sorry for the slow response. I don't know of any way to estimate the time it will take a priori, but in general, the time scales with number of nodes, number of edges, and number of positive feedback loops in the network.

jcrozum commented 2 years ago

This issue seems to be resolved for the time being, so I'm closing it to keep things tidy. Feel free to open a new issue if there's more that needs to be discussed on this topic.