jcrozum / pystablemotifs

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

Reducing network #88

Closed priyambial123 closed 2 years ago

priyambial123 commented 2 years ago

Hello

I have 21 nodes in the network and I get an error when I run the attractor analysis. Is the error because of more number of nodes?

This is the network:

DIDO1*= not (miR101 or miR6504 or miR582 or miR144 or miR93 or miR98 or X1 or miR92a or miR181b or miR3941 or miR4672 or miR582 or miR198) and (MYCN or MYC or KDM5A or SOX2 or TFAP2C or KDM2B)
CAND2*= not (let7a)
MYCN*= not (miR101 or miR6504 or miR582 or miR144 or miR93)
MYC*= not (miR98 or X1 or miR92a or let7a)
KDM5A*= not (miR181b)
SOX2*= SOX2
TFAP2C*= TFAP2C
KDM2B*= KDM2B
miR92a*= MYCN or MYC
X1*= MYCN or MYC or KDM2B
miR3941*= MYCN or MYC or TFAP2C or KDM2B
miR4672*= MYCN or MYC
miR101*= MYC or KDM2B
miR144*= MYC
miR582*= MYC or SOX2 or TFAP2C
miR98*= KDM2B
miR198*= KDM2B
miR93*= MYCN
let7a*= MYC
miR6504*= miR6504
miR181b*= miR181b

Error:

ERROR failed to run bnet2primes: cmd=C:\Python310\lib\site-packages\pyboolnet\binaries\BNetToPrime\BNetToPrime_win64.exe, return_code=1, out=b'{"CAND2":[[{"let7a":1,\x08 \x08},\x08 \x08],[{"let7a":0,\x08 \x08},\x08 \x08]],"DIDO1":['
RULES
Traceback (most recent call last):
  File "D:\Users\Labor\attractors\infant_clusters\simulation1\attractors_cluster2_1.py", line 14, in <module>
    ar = sm.AttractorRepertoire.from_primes(primes)
  File "C:\Python310\lib\site-packages\pystablemotifs\AttractorRepertoire.py", line 98, in from_primes
    x.analyze_system(primes,max_simulate_size=max_simulate_size,max_simulate_size_vc=max_simulate_size_vc,max_stable_motifs=max_stable_motifs,max_in_degree=max_in_degree,MPBN_update=MPBN_update)
  File "C:\Python310\lib\site-packages\pystablemotifs\AttractorRepertoire.py", line 196, in analyze_system
    self.succession_diagram = sm_succession.build_succession_diagram(primes,max_simulate_size=max_simulate_size,max_simulate_size_vc=max_simulate_size_vc,max_stable_motifs=max_stable_motifs,max_in_degree=max_in_degree,MPBN_update=MPBN_update)
  File "C:\Python310\lib\site-packages\pystablemotifs\succession.py", line 515, in build_succession_diagram
    myMotifReduction=sm_reduction.MotifReduction(motif_history,fixed.copy(),primes,max_simulate_size=max_simulate_size,max_simulate_size_vc=max_simulate_size_vc,prioritize_source_motifs=prioritize_source_motifs,max_stable_motifs=max_stable_motifs,MPBN_update=MPBN_update)
  File "C:\Python310\lib\site-packages\pystablemotifs\reduction.py", line 412, in __init__
    self.reduced_primes = reduced_primes.copy()
AttributeError: 'NoneType' object has no attribute 'copy'

Thanks

priyambial123 commented 2 years ago

Sorry for posting the question. I could solve it. I referred to a similar post which I posted earlier. https://github.com/jcrozum/pystablemotifs/issues/80