0:19

What we are going to discuss in this lecture is illustrated on this slide.

We're going to continue our discussion of

rate-balance plots, and to understand how we

can predict whether or not bistability will

be present in a one dimensional system.

So we're going to show a few slides on this, on analysis of rate-balance plots.

But what's going to be most interesting in this

lecture, what's going to be the core of this, is

I'm going to show you some examples of how you

can generate rate-balance plots using the program environment MATLAB.

1:03

When you have a system that's over here like this.

You, you have a species A that can either be in the unphosphorylated

form that we call A, or the phosphorylated form that we call A star.

If this forward rate depends on some stimulus S, and also depends on A star

itself such that when A star goes

up, it makes this phosphorylation reaction occur faster.

You can express the forward rate through this

rather complicated equation here, and you can plot several

different values of this forward rate for different values

of this hill exponent little n, that's shown here.

1:40

And what we saw in the last lecture is when you

have this ultra-sensitive feedback, meaning n is greater than one, you

can get bistability because the forward rate in this case and

the backward rate which is the red curve intersected three places.

You have three steady states.

The left most one is stable, the right most

one is stable and the middle steady state is unstable.

And as we discussed in the last lecture, this is

one way you can get bistability in a one dimensional system.

2:11

The other way you can get bistability in a one dimensional system

is if you have linear feedback, but you have a saturating back reaction.

What we saw before is when you have linear feedback, this equation for

the forward rate is a little bit simpler than what we saw before

2:28

where where the rate constant depends on the stimulus, but it, it also depends

on a star, but it only depends on a star raised to the first power.

In this case, your forward rate is this parabola here that's shown in blue.

2:43

In all the previous examples, we just said the

backward rate was equal to K minus times A star.

But, what if your back reaction occurred through an enzyme,

and what if you what if it obeyed a Michaelis

type equation here, where your backward reaction depended on, was

A star divided by A star plus some Michaelis Constant K,M.

And we've del, delineated this here KMB to indicate

that this is a Michaelis Constant, for the backwards reaction.

So, being in this case is for backward.

3:25

and we can see that now the backward reaction,

and forward reaction intersect each other in three places.

One, two, three.

Further, we can go through the analysis that we

had last time to show that this right most

steady state is stable, this left most steady state

is stable, and this middle steady state is unstable.

We won't go through all three.

But just to review, let's go through what

happens if we analyze this middle steady state here.

How do we know this one is unstable?

3:53

Well, what we do is we imagine hypothetically

what if we're sitting right at this steady

state here, and then we have a small

deviation either to the right or to the left.

So what if A star increases from this value that we have at the steady state.

Well, if A star moves here, our forward reaction

in blue is greater than our backward reaction in red.

Therefore the difference between the two,

forward rate minus backward rate is positive.

That's going to move the system to the right up

to the stable steady state here on the right.

4:25

Conversely, what if you start at this steady state in the middle

here and you have a decrease in A star system over here.

Well, over here the backward reaction is greater than the forward reaction.

Therefore the overall rate is negative.

And that's going to push you to the left.

That's how we conclude this steady state unstable, and we do a similar

analysis to conclude that this steady state and this steady state are stable.

This is our second way that we can get bistability in a one-dimensional

system, is if you have linear feedback

plus you have a saturating backwards reaction.

5:06

We showed that you can get a steady state either at a very low

level or you can get stable steady state at a high level of A star.

But we never talked about how a cell can switch between the

low level of A star and the high level of A star.

Well, one way you can change states is to vary the amount of stimulus S.

Most of the plots we've shown before have

assumed that our stimulus S is equal to zero.

And we've done this just to keep things simple and not confuse things.

5:33

But if we look at the equations here, we see that the forward

rate doesn't just depend on A star, that's what we've been focusing on.

But the forward rate also depends on the amount of stimulus S.

And for the examples we showed before for this ultra

sensitive positive feedback, we assumed that S was equal to zero.

5:56

This curve on the bottom here the one for S equals 0.

And then every curve here as you move up from the, the 1, to

2, to 3 to 4, to 5, that's for a slightly larger increase in S.

6:10

And what we can see if we look here is that

for the lowest value of S, we have three intersections, one, two,

three, which are the forward rate and the backward rate, where

for this highest value of S, we only have one intersection, right?

There's no intersection between the forward rate and the

backward rate down here for relatively low values of S.

6:30

Now we can imagine what would happen if we had if we had an

experiment where we had, where we started with a low level of A star.

We increased S gradually and then we measured what

would be our stay state value of A star.

Well, for no stimulus, we would have zero because these two curves intersect here.

For a slightly lower value of stimulus, we would have an intersection

here and therefore we'd have, have a low value of A star.

And then as we continue to increase A star, we get,

we, as we continue to increase the stimulus we get a gradual

increase of A star until eventually we got here and then wow,

obviously we would increase to this much greater value of A star.

What's indicate, what's happening here, is we're move, moving at this

place where instead of intersecting three times, these two curves intersects once.

In other words, the system is switching from being bistable,

from being monostable, sorry, from being bistable to being monostable.

So where the system switches between three intersections

and one intersection, that's where we have a bifurcation.

That's where we have a sudden increase in our output, A star.

7:49

What you have when you have bistability is that you

increase your, your stimulus, you increase your trigger, and then at

some point, some of these switch from a low value of

your, of your output to a high value of your output.

What happens when you decrease the amount of trigger.

Well, when you decrease the amount of stimulus, you, you may

eventually come down to a low value of, of your output.

But when you come down to the low value of the output, that's going to

occur in a much lower value of the trigger than, than what you had before.

8:29

You eventually switch to the, the higher value of the output.

But then on the way back then as you continue to decrease the

amount of stimulus you're decreasing the amount

of trigger, maybe you never come down.

And it's important to note that in either case the transition

from low level to high level going on the way up

is at a higher value than the transition on the way

down going from the high level to the low level here.

What we're going to do now is we're going to move

out power point, and we are going to move MATLAB

programming environment and I'm going to show you an example

of some rate balance plots so we can generate MATLAB.

And we are going to show these rate balance plots and how

you calculate them and how you plot them Under a couple different conditions.

9:13

We're going to look at the condition of no feedback, and then we're

going to look at the condition of

ultrasensitive positive feedback that we discussed before.

[BLANK_AUDIO]

What we're going to do now is we're

going to demonstrate a script that I wrote in

MATLAB Or to generate and plot the rate

balance plot that we talked about in the lecture.

I feel like it's one thing to, to see them described

conceptually in a lecture, but it's gives you a different type

of understanding if you see how the, how this type of

plot is actually implemented in a programming environment such as MATLAB.

9:54

And I also have the, in the Matlab Editor, I

have this particular script open which we call a rebalance.m.

So what we want to do first is we want to run this, and you'll see like we, like

we showed before in other Matlab demonstration, that we're

not in the correct Directory when I first start

up MATLAB, but if you have your the script that you want to run open the, in the

editor, and you press run, then you can change

to that folder and, and you can run it.

And now what we see is that when we run rate rate balance dot, dot

[UNKNOWN] it generate four plots in MATLAB There's

two different rate balance plots we've generated here.

This first rate balance plot, which are all the plots are shown

in figure one, and then the summary is shown in figure two.

This shows us rate balance plots for a very

simple Macallan system without any feedback in it at all.

And then, figure three over here, and figure four, show us the the rate

balance plots and the bifurcation in figure

three and the bifurcation diagram in figure four.

For the for the system with ultrasensitive positive

feedback, as was talked about in the lecture.

And, this is this bifurcation diagram here shows that

you have bistability over a particular range From -

for values up to say 0.32 we get bistability,

for values above that we don't have bistability anymore.

So now we're going to go look at the code and demonstrate

a little bit how - how I implemented this particular script.

This script is going to be provided to you.

And part of the homework assignment is going to

be to modify this script, to do something else.

11:40

Now let's look at the actual code here which you can

see in the MATLAB editor, with the name rate balance dot m.

You can see that the first part here from line one down to line 26.

That I believe all but, is number one.

We system with no feedback and a forward rate

depends, and the forward rate depends on some stimulus S.

12:16

First I define the variable A star.

A star starts at zero, ends at one, and it has

a step of 0.001, so we have 1001 points in A star.

And then stimulus starts at 0.5, has a step size of 0.5,

and it ends at 20, so we have 48 values of the stimulus.

12:56

And we're calculating this at the beginning, because we're only

going to have one value of the backward rate as function.

One function of that backward rate is a function of A star.

And this is not going to change when we change the stimulus.

13:11

Then we define we open up a figure.

We type, hold on, that's in order to plot

all the different rate balance plots on on one.

Then we plot A star versus backward rate in red with a line width of two.

And then this command here, I haven't really introduced this in the lecture.

So this is a way of taking the tick marks and setting them outward.

This is a set is a, is a general command

in MATLAB if you want to set the attributes of something.

GCA here stands for get current access.

And it's saying you can set the take directory as out.

So let's see what happens when we

13:46

just implement these these lines here.

I'm going to do one more thing here.

I'm going to add at the beginning: close all, clear all.

That way we can, we know that every time we run

this it's going to start from scratch with all the variables cleared.

So now, what we can do is we can just select these lines here

14:23

and paste them in here.

So what we've, all we've done so far is we've plotted A

star on the x-axis here, and then the backward rate on the y-axis.

Remember that, what we what we generated was for

forward rates, for many, many different values of the stimulus.

What we ended up with when we ran the whole script

were like 40, 40 blue lines that were decreasing blue lines.

How did we generate the 40 blue lines?

Well, that's what a for loop is for.

And that's a for loop is what we have here.

15:01

then we have to run this 40 times.

Each time we go through the for loop, we compute the forward rate.

The forward rate is equal to the variable

k plus, times the current value of the stimulus.

That was s sub i.

So, the first time it'ill be the first value in s.

Second time it will be the second value in s, etcetera.

And then, we multiply this by 1 minus A star.

Remember that you have forward rate is conversion of A to A star.

So the substrate in this case is however much of a is not in the A star, or

however much is not [UNKNOWN], and we've, that's equal

to one minus however much we have in A star.

15:38

Now we need to determine where the two

curves cross, because the summary plot that we

generate is steady state value of A star,

steady stare value of A star versus A star.

15:50

In order to determine where two curves cross,

we need to see where the difference between

the two, where the absolute value of the

difference of the two curves is at a minimum.

And that's what we do here we say, mindummy

and dex, dex in this case stands for index.

Is equal to the minimum of the absolute

value of the forward rate minus the backward rate.

Sometimes when the two curves cross, forward rate

minus backward rate will be exactly equal to zero,

but other times it might very close to zero and not ex, in fact equal to zero.

And this is something we discussed in the early lectures.

We don't really care exactly what the minimum is,

what we care about is where does the minimum occur.

So that's why I call this a dummy variable, the, the dummy minimum; which

we're not going to use subsequently and then the index is equal to this term here.

'because what we really care about is, what's the value of A when

we're at the steady state, when a forward rate and a backward rate cross.

The steady state value of A is equal to whatever value

you are, whatever value you have of A star at that index.

And then we want to plot the score grade.

A star on the axis and point forward rate on

the y axis and you plot all these in blue.

16:59

This just defines the axes of the curve, and then

how do we plot our summary plot at the end.

Well, what we are going to have at the end is many different values

of stimulus S, and then many different steady state values of A star.

So we want to put stimulus on the x axis and

stead state value of A star on the Y axis.

17:22

Tells us to plot a an open circle for each value.

And tells us to connect those open circles with the line, and then I made

the line with a little bit normal wider than usual, so its easier to visualize.

And again, this command here tells us to set the

tick set the tick marks pointed out rather than pointed in.

17:43

Something I, I didn't, probably, I probably should have added to

these, which we'll go ahead and add now are some labels.

So, the for the first figure here, you want to save the X label [NOISE]

is equal to A Star.

[NOISE] And Y label is equal to the rate.

because the first plot is of the rate balance force [NOISE].

18:31

Now let's run the, just this first part here.

So again, we can take this, and we can copy it, then

we go to the MATLAB command window, and we can paste it.

And let's review what we see.

18:46

Figure 1 in this case are the rate balance plots

for 40 different values of the stimulus, that why we

have 40 different values, four plots of the forward rate

in blue, and one plot of the backward rate in red.

And then, in figure two what we have over here

is our different values of stimulus from 0.05 up to 20.

And then, 40 corresponding values A star.

And this is how we can derive this

hyperbolic Michaelis type equation from a rate balance plot.

19:16

What we want to do next is we want to move on to the more complicated break analysis

plots, where we have ultra-sensitive feedback and we have variable s.

So now let's edit the second part of the MATLAB script here.

Let's take these commands, close all and clear

all, and put them down in the second part.

So that way when we run this part, we're going to start with new variables.

And let's take our labels that we added to this first

plot part, to add that to the second plot down here.

20:18

parameters we need to define, those were all

defined here, we only need to define those ones.

Once again we thought the backward ray, we set up

the figure, and then plot the backward ray on that figure.

I have done something a little different here.

20:32

One thing you may have remembered when we, when we ran this is that you could see

this screen filliping between one one figure and

the next figure, and it did that several times.

The way we're going to generate this is, is that we're going to

plot the we're going to plot the forward rate on the rate

balance plot, and then we're going to switch to the other figure

and we're going to plot the where they cross each other.

And then we're going to flip back to the rate balance plot, and plot those again.

How do we do that?

21:00

We define one figure here and then we want to, we want to be able to tell

MATLAB, how do we go, how do we go back to the figure when we're gone?

And so, MATLAB calls the figure numbers, it calls those handles.

21:14

And sometimes you know that okay, when I run this it's going to be

figure one, or I run this and this one's going to be figure two.

But other times you don't know.

You might already have a lot of figures already open and, and in that

case the next figure is going to be, you know, figure 13 or figure 14.

So how do you write something general so that it, it

knows where to go back no matter what figure number you're at.

Well this command here GCF says get current figure.

And this just tells you what figure number your on.

So, when, when your on figure one, and

you take GCF, it's going to return the value one.

And we define that in a variable we call handle one.

The reason we do that is because we're going to

have this second figure here thatwe're going to call handle two.

And this, so this first figure here is going

to be the one that shows the rate balance plots.

The second figure here is going to be the

one that plots the summary plot, the bifurcation diagram

with stimulus on the x axis and the steady

state value or multiple values based on the y axis.

And this one we'll going to handle two, and

by defining this two variables, handle one and handle

two, that's when it go allows to flip back

and forth between one figure and the other figure.

22:25

Here's where we calculate the forward rate.

It's pretty straight forward compared to what we what

we had before, but it is certainly more complicated.

Something else you notice, this is a reminder of some MATLAB.

Using array arithmetic in MATLAB is we have these dots here.

22:42

We have to take each value of A star and

raise each value of A star to a certain power.

The power is defined by H.

An H in this case would be defined as equal to four.

So, we have to take each value of A star and raise it to the fourth power.

22:54

A Star remember has 1,001 elements in it, and that

the way you can raise each element in A star to

the fourth power is by doing a dot raise to the

fourth power, rather than just raise it to the fourth power.

And we have to divide that by something

else that's also going to have 1,001 elements in it.

And we have to do a dot divide there for it to do on

an element, by element basis, and similarly we do a dot multiply over here.

23:31

Now here's where things get a little bit tricky.

What we saw is that the forward rate and the backward rate, when you have

ultra sensitive positive feedback, they can either intersect

one time, or they can intersect three times.

24:14

The reason I set this equal to equal to being empty, is

we're going to add things to it, but we don't know going in

how many things we're going to add to it, is it going to be

one, is it going to be two, or is it going to be three?

This is a way to make it very flexible.

24:27

Then I compute the difference between the for rate and the rate.

Why do I do that?

It's because for, as we go through this difference between

the forward rate and the backward rate, we know that these

two curves have crossed one another anytime we go from

the difference being positive to being either negative or, or zero.

24:49

And this is what we're this is what we're going to, we're going to check out.

We say for i, i, i equals 2 to the length of the forward rate, if the sine

of the current value of difference is not equal

to the sine of the previous value of difference.

But then that means that we've, we've the two curves have crossed one another.

So in other words if the current value

is either, is positive and the previous value is

either zero or negative, then we know that we

have that the two curves have crossed one another.

And so this is our way of going through this, this long vector called difference.

And seeing every place that we, that we cross zero on this one vector.

And when we're done, this variable crossings might have one element in it.

It might have three elements in it.

We have extreme calculations here.

It might have zero elements in it.

But in, in this case we know that it's always going to have either one or three.

So then what we want to do is we're going to go to

figure handle 2, this is the one that plots our summary plot.

And plot the stimulus on the x axis and then all of our values of A

star at these crossing points on the, on the y axis.

So what we care about are not the values that are in crossing,

because crossings is just going to tell us which element are you at.

26:12

right?

What we do is we take whatever, however

many things we already have in crossings and

then add to that i, i, i, which is the, which is whatever element that we're at.

So that could say that, okay, these two curves cross

one another at the 50th point, at the 200th point, and

at the 700th point and, but what we want to

plot whatever the val, the corresponding values are of A star.

So that's why we plot A star sub crossings on the y axis.

26:53

go to the MATLAB command window, and we're going to paste.

So now you can see that it generates these 40 different values of the the

forward rate, as, as a function of, for the 40 different values of the stimulus.

And over here we have stimulus on the x-axis and

we have the corresponding values of A star on the y-axis.

And what we can see is that for these low values of stimulus the, so

that would be like this curve here, two curves cross three times.

That's why we have that's a, a low stable steady state.

This failure here that is the intermediate unstable steady state,

and this failure here that is the high stable steady state.

But then as our stimulus gets larger and larger

27:43

we only cross at this height, steady, stable steady state.

So over here we don't have bistability, we have monostability.

But over this range here, we have bistability.

Let's actually go ahead and, and visualize this more

clearly by not plotting 40 different values of stimulus.

But it's just by a few, so you can visualize these these curves.

It's good to have very dense, packing of stimulus values here

to generate this nice bifurcation diagram that has many points in it.

If we want to look at these rate balance

plots, it's better to have fewer rather than 40.

So the way that you do that

28:19

is just by changing our, our stimulus step.

Instead of starting at zero and having a step

at 0.02 and going to 0.5, we're going to

start at zero, and we're going to have a step

at 0.1, and then we're going to go to 0.5.

So now we're only going to have six values to

the stimulus, rather than many more values to the stimulus.

28:41

So again, we copy this, we got to our MATLAB

editor, we go to our command window, and we paste it.

Okay, so now you can see you only have six values of stimulus.

And now, if we look at figure one, and we maximize this, we can see

28:57

clearly when the the two curves cross either one time or three times.

For the lowest value of stimulus, we have three crossings, three

crossings, three crossings, and then somewhere

here, between the fourth value of

stimulus and the fifth value of stimulus, is where you move

from, to the two curves crossing three times to crossing one time.

And remember from the lectures, that's where we get a bifurcation.

This bifurcation between the fourth and the fifth points.

29:22

We can see over here one, two, three,

four, we have three crossings, somewhere here is

where we get the bifurcation and, and we

move from a bistable system to a monostable system.

29:34

As I mentioned, this script that we've been working on,

ratebalance.m, is going to be provided to you, and part of

your homework assignment is going to be to modify this

to generate bistability in a one-dimensional system in a different way.

So I hope that this has been a helpful exercise to go through.

The logic of ,of how I wrote this program to show

you how you can do these test of analyses using MATLAB.

Now,

30:01

let's summarize this lecture, our third lecture on bistability.

In a one variable system, we saw

two different ways that bistability could be produced.

It can be produced when you have a ultrasensitive positive feedback or

you can get bistability if you have a back reaction that saturates.

Another thing we've learned is that when you analyze rate-balance plots, you can

from these generate bifurcation diagram that

shows a transition from monostability to bistability.

And finally, a third thing we saw is that array arithmetic in MATLAB can be used

to produce rate balance plots that are helpful

for understanding the dynamical behavior of a biochemical system.