**Simulate the dynamics of a feedforward loop (X->Y, Y->Z, X->Z).**
Make the following assumptions:
- The cell expresses numerous copies of protein X. Whenever signal Sx appears or disappears, step-like activation or deactivation of X is triggered (no delay between Sx switching on/off and X becoming activated/deactivated).
- The signal Sy for activation of Y is present throughout the simulation such that all copies of protein Y that are produced immediately become active, Y*=Y.
- The production rate of Y is modelled using an activating or repressing Hill function f(X).
- The production rate of Z is modelled using a product of activating or repressing Hill functions f(X)*g(Y) (AND logic).
%% Cell type:code id: tags:
``` python
importnumpyasnp
fromscipy.integrateimportodeint
importmatplotlib.pyplotasplt
%matplotlibinline
```
%% Cell type:code id: tags:
``` python
# setting some parameters for plots
plt.style.use('seaborn')
SMALL_SIZE=12
MEDIUM_SIZE=16
BIGGER_SIZE=20
plt.rc('font',size=SMALL_SIZE)# controls default text sizes
plt.rc('axes',titlesize=SMALL_SIZE)# fontsize of the axes title
plt.rc('axes',labelsize=MEDIUM_SIZE)# fontsize of the x and y labels
plt.rc('xtick',labelsize=SMALL_SIZE)# fontsize of the tick labels
plt.rc('ytick',labelsize=SMALL_SIZE)# fontsize of the tick labels
**Coherent FFL where X and Y are both activators**
- Calculate the temporal profiles of Y and Z following an ON step of Sx (Sx=0 for t<=0andSx=1fort>0).
- Calculate the temporal profiles of Y and Z following an OFF step of Sx (Sx=1 for t<=0andSx=0fort>0).
- Calculate the temporal profiles of Y and Z for pulses of Sx (Sx=0 except for a pulse of duration D). Compare the profiles for pulses of various lengths.
**Incoherent FFL where X is an activator and Y a repressor**
- Calculate the temporal profiles of Y and Z following an ON step of Sx (Sx=0 for t<=0andSx=1fort>0).
- Calculate the temporal profiles of Y and Z following an OFF step of Sx (Sx=1 for t<=0andSx=0fort>0).
Design and implement the network of interlocked feedforward loops shown in the figure such that the simulated profiles of the output genes in response to switching on X1 reproduce the profiles in the figure.
%% Cell type:markdown id: tags:
<imgsrc="image.jpg"align="center"/>
%% Cell type:code id: tags:
``` python
importnumpyasnp
fromscipy.integrateimportodeint
importmatplotlib.pyplotasplt
%matplotlibinline
```
%% Cell type:code id: tags:
``` python
# setting some parameters for plots
plt.style.use('seaborn')
SMALL_SIZE=12
MEDIUM_SIZE=16
BIGGER_SIZE=20
plt.rc('font',size=SMALL_SIZE)# controls default text sizes
plt.rc('axes',titlesize=SMALL_SIZE)# fontsize of the axes title
plt.rc('axes',labelsize=MEDIUM_SIZE)# fontsize of the x and y labels
plt.rc('xtick',labelsize=SMALL_SIZE)# fontsize of the tick labels
plt.rc('ytick',labelsize=SMALL_SIZE)# fontsize of the tick labels