Modelling Tutorial 2
The goal of this page is to continue you modelling journey. You've made a model and played with it but there's still a couple more things we need to be able to create good models.
Last updated
Was this helpful?
The goal of this page is to continue you modelling journey. You've made a model and played with it but there's still a couple more things we need to be able to create good models.
Last updated
Was this helpful?
So all the models we have run until now had substrates and products but we've left the modifiers box empty in the reactions file. So, what are modifiers?
You might want to model NFkB inducing a target gene. And the tempation would be to represent that model with a system that looks like the below:
Indeed, this would partly work. As NFkB went up IkB would go up and as NFkB went down IkB would go down. But this schematic actually represents NFkB turning into IkB, which is not what happens. NFkB is not "used up" in the production of IkB. Similarly, mRNA is not used up in the production of protein. So we need a way to have NFkB affecting the rate of production of its targets, without being a substrate in the reaction. This is where modifiers come in. A more accurate drawing might be this:
It's important to note that modifiers point to arrows not nodes. So NFkB doesn't make IkB go up, it makes the expression rate of IkB increase. This might seem like semantics but it will be important for making models accurates as they get larger.
Note that the circle on a stick is the symbol for promotion. This means that NFkB promotes the production of IkB. Inhibition is represented by a stick with a cap on it like this:
This would mean that as A goes up the expression rate of B decreases. So let's make the model of NFkB promoting the expression of IkB.
Remember models are made of 3 CSV files so we need to create 3 CSV files. You'll want to create a reactions file that looks like this:
We'll need a rate laws file that includes a rate law with a matching name. This should look like this:
Wow that maths is scary. Let's have at what that rate law looks like if we write it out nicely:
So we have k1 multiplied by some big fraction. k1 will be the overall expression rate. So if we want lots of IkB k1 has to be large, if we want less we need to make k1 smaller. Now let's break down the fraction. The best way to think about this fraction is to think about what happens when there is a huge amount of the modifier, and what happens when there is a tiny amount of modifier. So if mod1 is 99999, what happens.
Hopefully the above shows you that the expression rate law we are using scales between 0 and k1 as the modifier increases from 0 to a high concentration. The expression rate equals half of k1 when the concentration of the modifier is the same as k1. So now we are ready to create the parameters file. If we want IkB to be dependent on NFkB, and we want the maximum IkB expression to be 20nM/s, and we want 5nM of NFkB to induce half of the maximum IkB then we will create a paramters file that looks like this:
To run this new model we need to make some changes to the notebook where we solve the model.
Have a go at making these changes your self. You will need to change the names of the files the model uses and the initial conditions of the proteins. Try and start with 10nM of NFkB and 0nM of IkB. Once you've made those changes run the entire sheet (using the menu and hitting kernel -> "restart and run all" can be help helpful to make sure none of your previous work is going to impact your new model.
This error does actually give us a hint. you'll want to read errors looking for the line that starts with "In" as this tells you which bit of your code cause the problem. This error says that the 9th block of code went wrong and it went wrong on line 1. We can see that the 9th block of code is only one line "plot(sols)" so this is where our error happened. You can tell this is the 9th block of code because it says "In [9]" next to it. These numbers will change every time you run the code.
So we know that it went wrong on "plot(sols)" so if we look at the error message it says "UndefVarError: sols not defined". This means that it couldn't find anything called "sols". So let's check where we define sols.
For more advanced errors, for now, talk to Simon!
These are hard, give them a go and talk to Simon when you get stuck. You're not expected to get through these without help!
Stop IkB increasing forever. Add reactions for the exression and degradation of IkB. Refer back to how these were modelling in tutorial 1.
IkB actually binds to NFkB. Try modelling NFkB and IkB binding and unbinding (two separate reactions). Hint: you'll need a new rate law with two substrates for the binding [s1] * [s2] * [kon] should work. For unbinding you can just use [s1] * [k1].
NFkB doesn't induce IkB protein it actually induces IkB mRNA. Can you add IkB mRNA, and make it inducible by NFkB.
Hint: you'll want NFkB to promote IkB mRNA expression, you'll want IkB mRNA to promote IkB protein expression. Both mRNA and protein should have expression and degradation reactions.
if k2 is 1 then this is 99999/100000, which equals 0.99989, which is very very close to 1. If k2 = 10, this is still very close to 1 (0.99990...). In fact this fraction is always going to be very close to 1. Which makes the rate of expression:, which is approximately: , which is approximately just k1. So when the concentration of the modifier is very high the rate of expression is just k1. This is the maximum possible expression rate. What happens if there is almost no modifier? is approximately , which is zero. So when there is very little modifier there will be very little expression. So the fraction scales between 0 and 1 depending on how much modifier there is in the system. Which means the rate of expression will scale betwee 0 and k1, depending on how much modifier is in the system. But what does k2 do?
Let's imagine some specific examples. Write the equation out and put some numbers in to see what happens.
Most errors boil down to typos. So this is the first thing to check. When you get an error message you'll see something incomprehensible like this: