jcrozum / pystablemotifs

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

Control targets #85

Closed priyambial123 closed 2 years ago

priyambial123 commented 2 years ago

Hello

I did the target control analysis, to identify the drivers which lead to given target state. State of the sets identified doesn't seem to follow the Boolean rules given in the network. For example, in the first set {'MYCN': 1, 'NCKAP5': 1}, MYCN inhibits NCKAP5 (as given in the rules below) but the identified set (output) shows that when MYCN is in ON state, NCKAP5 is also in ON state. Please find the script used and the output file below


import pystablemotifs as sm
import networkx as nx
from timeit import default_timer

relative_path_to_model = r'''simulation3.txt'''
primes = sm.format.import_primes(relative_path_to_model,remove_constants=True)
sm.format.pretty_print_prime_rules(primes)

ar = sm.AttractorRepertoire.from_primes(primes)
ar.summary()

target = {'PKHD1L1':0, 'AOAH':1, 'NCKAP5':1}

start=default_timer()
interventions = sm.drivers.knock_to_partial_state(target,primes,max_drivers=14)
end=default_timer()
print("Time running method:",end-start)
print("Sets found:")
for x in interventions: 
    print({k:v for k,v in sorted(x.items())})

Output:

AOAH* = !BCL6
BCL6* = !miR335
MYCN* = !miR19b
NCKAP5* = !MYCN & !SOX2 & !miR130b & !miR19b & !miR7977
PKHD1L1* = !BCL6 & !MYCN & !TCF4 & !miR3183 & !miR335 & !miR4469
SOX2* = SOX2
TCF4* = TCF4
miR130b* = MYCN
miR19b* = MYCN
miR3183* = TCF4 | MYCN | BCL6
miR335* = MYCN | BCL6
miR4469* = MYCN
miR7977* = SOX2
There are 4 attractors.
{'AOAH': 'X', 'BCL6': 'X', 'MYCN': 'X', 'NCKAP5': 'X', 'PKHD1L1': 'X', 'SOX2': 0, 'TCF4': 0, 'miR130b': 'X', 'miR19b': 'X', 'miR3183': 'X', 'miR335': 'X', 'miR4469': 'X', 'miR7977': 0}

{'AOAH': 'X', 'BCL6': 'X', 'MYCN': 'X', 'NCKAP5': 'X', 'PKHD1L1': 0, 'SOX2': 0, 'TCF4': 1, 'miR130b': 'X', 'miR19b': 'X', 'miR3183': 1, 'miR335': 'X', 'miR4469': 'X', 'miR7977': 0}

{'AOAH': 'X', 'BCL6': 'X', 'MYCN': 'X', 'NCKAP5': 0, 'PKHD1L1': 'X', 'SOX2': 1, 'TCF4': 0, 'miR130b': 'X', 'miR19b': 'X', 'miR3183': 'X', 'miR335': 'X', 'miR4469': 'X', 'miR7977': 1}

{'AOAH': 'X', 'BCL6': 'X', 'MYCN': 'X', 'NCKAP5': 0, 'PKHD1L1': 0, 'SOX2': 1, 'TCF4': 1, 'miR130b': 'X', 'miR19b': 'X', 'miR3183': 1, 'miR335': 'X', 'miR4469': 'X', 'miR7977': 1}

Time running method: 1985.7764711999334
Sets found:
{'MYCN': 1, 'NCKAP5': 1}
{'NCKAP5': 1, 'miR19b': 0}
{'NCKAP5': 1, 'miR335': 1}
{'MYCN': 0, 'SOX2': 0, 'miR335': 1}
{'BCL6': 0, 'NCKAP5': 1, 'miR4469': 1}
{'AOAH': 1, 'NCKAP5': 1, 'miR4469': 1}
{'BCL6': 0, 'NCKAP5': 1, 'TCF4': 1}
{'BCL6': 0, 'NCKAP5': 1, 'PKHD1L1': 0}
{'BCL6': 0, 'NCKAP5': 1, 'miR3183': 1}
{'AOAH': 1, 'BCL6': 1, 'NCKAP5': 1}
{'AOAH': 1, 'NCKAP5': 1, 'TCF4': 1}
{'AOAH': 1, 'NCKAP5': 1, 'miR335': 0}
{'AOAH': 1, 'NCKAP5': 1, 'PKHD1L1': 0}
{'AOAH': 1, 'NCKAP5': 1, 'miR3183': 1}
{'BCL6': 0, 'MYCN': 0, 'SOX2': 0, 'miR4469': 1}
{'AOAH': 1, 'MYCN': 0, 'SOX2': 0, 'miR4469': 1}
{'BCL6': 0, 'MYCN': 0, 'SOX2': 0, 'TCF4': 1}
{'BCL6': 0, 'MYCN': 0, 'PKHD1L1': 0, 'SOX2': 0}
{'BCL6': 0, 'MYCN': 0, 'SOX2': 0, 'miR3183': 1}
{'AOAH': 1, 'BCL6': 1, 'MYCN': 0, 'SOX2': 0}
{'AOAH': 1, 'MYCN': 0, 'SOX2': 0, 'TCF4': 1}
{'AOAH': 1, 'MYCN': 0, 'SOX2': 0, 'miR335': 0}
{'AOAH': 1, 'MYCN': 0, 'PKHD1L1': 0, 'SOX2': 0}
{'AOAH': 1, 'MYCN': 0, 'SOX2': 0, 'miR3183': 1}

Thanks

jcrozum commented 2 years ago

Yes, the control interventions may involve overriding nodes that regulate one another. Sometimes these interventions are in conflict with the specified rules, but that doesn't always (or even usually) mean that they are impossible to implement.

For example, if the inhibition occurs at the transcriptional level, inserting a copy of the inhibited gene downstream of a different transcription factor that is known to be present may achieve the desired intervention. The details of how to implement the control interventions depend on biological considerations that are not captured by the Boolean rules alone.

priyambial123 commented 2 years ago

Is there possibility that in the set {'MYCN': 1, 'NCKAP5': 1} MYCN upregulates the target AOAH (MYCN activates miR19b, miR19b downregulates BCL6 and this BCL6 downregulation activates AOAH) and NCKAP5 is activated i.e. without any influence from MYCN. Is this possible explanation here. As in other simulations, I could see the first set is the target itself like {''NCKAP5': 1} without any influence from other nodes

jcrozum commented 2 years ago

That might be possible. It's hard to say without digging into it some more. The function you're using, knock_to_partial_state, is a brute-force approach, and it will find all the interventions (up to a specified size) that achieve the desired outcome. If you want to ignore certain nodes, you can supply the node names in a list to the function using the forbidden keyword, e.g.,

interventions = sm.drivers.knock_to_partial_state(target,primes,max_drivers=14,forbidden=['NCKAP5','AOAH'])

You might want to do this if you don't want to consider interventions that require overriding the target directly.

priyambial123 commented 2 years ago

Thank you, I will try out this. Is there a way to find the state of other nodes in the network for a given set

jcrozum commented 2 years ago

To find the state of the other nodes for a given intervention, use the logical domain of influence function, e.g.: fixed, contradicted = sm.drivers.logical_domain_of_influence(intervention,primes) This will tell you all the nodes that are (logically) fixed by the intervention (fixed). Here, intervention should be a dictionary that specifies the which nodes are are fixed as part of the intervention; contradicted will which part of the intervention will be reverted if you remove the external control. Nodes not listed will have values that (in general) depend on the initial conditions.