jcrozum / pystablemotifs

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

Attractor control without pre-building succession diagram #76

Open jcrozum opened 2 years ago

jcrozum commented 2 years ago

In issue #73, I brought up the possibility of doing attractor control without the succession diagram.

Here is a rough sketch of how the algorithm would work.

stable_motifs = pbn.trap_spaces.compute_trap_spaces(primes, "max")
for motif in stable_motifs:
  if psm.drivers.fixed_implies_implicant(target, motif):
    motif_drivers = psm.drivers.internal_drivers(motif,primes) # maybe save this step for a second loop after dropping
    reduced_primes = psm.reduction.reduce_primes(motif,primes)
    # repeat the above process using reduced_primes instead of primes, and keep track of motif_drivers
    # drop branches that end with no compatible stable motifs

We should try to implement something like this; it would pair well with pbn.trap_spaces.compute_trap_spaces(primes, "min").

yzongy commented 2 years ago

Or maybe store all motif_drivers and then combine them together, if it is mathematically equivalent?

stable_motifs = pbn.trap_spaces.compute_trap_spaces(primes, "max")
for motif in stable_motifs:
  if psm.drivers.fixed_implies_implicant(target, motif):
    motif_drivers = psm.drivers.internal_drivers(motif,primes)
    #then store motif_drivers in a list 
#Mix and combine stored motif_drivers