jcrozum / pystablemotifs

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

Motif reduction objects #81

Closed priyambial123 closed 2 years ago

priyambial123 commented 2 years ago

I generated an input rule file from my study and used this rule file to run the code given in Attractor candidate follow-up tutorial (advanced).ipynb

I could get the attractors but when I run the below code

mr0=ca[0].representative[0]
mr1=ca[1].representative[0]

I get this error:

Traceback (most recent call last):
  File "file_doc.py", line 16, in <module>
    mr0=ca[0].representative[0]
IndexError: list index out of range

This is the input file used:

PKHD1L1*= not (miR335 or miR3183 or miR4469) and (BCL6)
miR335*= BCL6 or MYCN
miR3183*= BCL6 or MYCN
miR130b*= MYCN
miR4469*= MYCN
BCL6*= not miR335
NCKAP5*= not (miR19b or miR130b or miR7977) and (MYCN or SOX2)
miR19b*= MYCN
MYCN*= not miR19b
AOAH* = BCL6
miR7977*= SOX2
SOX2*= SOX2

What are motif reduction objects? In the Attractor candidate follow-up tutorial (advanced).ipynb, PDGF, IL15 and Stimuli are given as source nodes. Any reason for giving these nodes as source nodes?

Thanks

jcrozum commented 2 years ago

That tutorial notebook is about how to do follow-up analysis on possible candidate attractors that pystablemotifs was unable to automatically rule out or verify. In your example, pystablemotifs does not run into any such difficulty, so there is no follow-up analysis needed.

The error is happening because the list of unverified candidate attractors is empty, but you are trying to access its elements anyway.

That notebook is designed to showcase a technique or approach, not as a black box, and so, without modification, it will not run properly on any rules other than the ones it's using.

As for your other questions, source nodes are those whose rules are themselves, e.g., "PDGF*=PDGF". The motif reduction objects refer to the networks obtained during the reduction process. They correspond to the nodes of the succession diagram.

priyambial123 commented 2 years ago

I didn't get the idea of unverified attractors, so couldn't understand the Index error. Thank you for explaining it

jcrozum commented 2 years ago

No problem! I'll close the issue now, but please don't hesitate to ask if you have additional questions.