User:Tom Adie/CS2

From OpenWetWare
Revision as of 08:29, 9 December 2008 by Tom Adie (talk | contribs)
Jump to navigationJump to search

<html> <style type="text/css"> .firstHeading {display: none;} </style> </html> <html> <style type="text/css">

   table.calendar          { margin:0; padding:2px; }

table.calendar td { margin:0; padding:1px; vertical-align:top; } table.month .heading td { padding:1px; background-color:#FFFFFF; text-align:center; font-size:120%; font-weight:bold; } table.month .dow td { text-align:center; font-size:110%; } table.month td.today { background-color:#3366FF } table.month td {

   border:2px;
   margin:0;
   padding:0pt 1.5pt;
   font-size:8pt;
   text-align:right;
   background-color:#FFFFFF;
   }
  1. bodyContent table.month a { background:none; padding:0 }

.day-active { font-weight:bold; } .day-empty { color:black; } </style> </html>

<html><style type="text/css">

div.Section { font:11pt/16pt Calibri, Verdana, Arial, Geneva, sans-serif; background-image: url(http://openwetware.org/images/a/a0/Background.PNG); background-size: 100%; background-origin: content; }

/* Text (paragraphs) */ div.Section p { font:11pt/16pt Calibri, Verdana, Arial, Geneva, sans-serif; text-align:justify; margin-top:0px; margin-left:30px; margin-right:30px; }

/* Headings */ div.Section h1 { font:22pt Calibri, Verdana, Arial, Geneva, sans-serif; text-align:left; color:#3366FF; font-weight:bold; }

/* Subheadings */ div.Section h2 { font:18pt Calibri, Verdana, Arial, Geneva, sans-serif; color:#3366FF; margin-left:5px; font-weight:bold; }

/* Subsubheadings */ div.Section h3 { font:22pt Calibri, Verdana, Arial, sans-serif; color:#E5EBFF; margin-left:10px; font-weight:bold; }

/* Subsubsubheadings */ div.Section h4 { font:22pt Calibri, Verdana, Arial, sans-serif; color:#2B48B3; margin-left:10px; font-weight:bold; }

/* Subsubsubsubheadings */ div.Section h5 { font:12pt Calibri, Verdana, Arial, sans-serif; color:#3366FF; margin-left:20px; }

/* References */ div.Section h6 { font:12pt Calibri, Verdana, Arial, sans-serif; font-weight:bold; font-style:italic; color:#3366FF; margin-left:25px; }

/* Hyperlinks */ div.Section a { }

div.Section a:hover { }

/* Tables */ div.Section td { font:11pt/16pt Calibri, Verdana, Arial, Geneva, sans-serif; text-align:justify; vertical-align:top; padding:2px 4px 2px 4px; }

/* Lists */ div.Section li { font:11pt/16pt Calibri, Verdana, Arial, Geneva, sans-serif; text-align:left; margin-top:0px; margin-left:30px; margin-right:0px; }

/* TOC stuff */ table.toc { margin-left:10px; }

table.toc li { font: 11pt/16pt Calibri, Verdana, Arial, Geneva, sans-serif; text-align: justify; margin-top: 0px; margin-left:2px; margin-right:2px; }

/* [edit] links */ span.editsection { color:#BBBBBB; font-size:10pt; font-weight:normal; font-style:normal; vertical-align:bottom; }

span.editsection a { color:#BBBBBB; font-size:10pt; font-weight:normal; font-style:normal; vertical-align:bottom; }

span.editsection a:hover { color:#3366FF; font-size:10pt; font-weight:normal; font-style:normal; vertical-align:bottom; }

/* Drop-down Menu */

  1. sddm {

margin: 0; padding: 0; z-index: 30 margin: 0; padding: 0; float: center; font: bold 12pt Calibri, Verdana, Arial, Geneva, sans-serif; border: 0px; list-style: none; }

  1. sddm a {

display: block; margin: 0px 0px 0px 0px; padding: 0 0 12px 0; color: #FFFFFF; text-align: center; text-decoration: none; }

  1. sddm a:hover {

border: 0px }

  1. sddm div {

position: absolute; visibility: hidden; margin: 0; padding: 0; background: #66aadd; border: 1px solid #66aadd } #sddm div a { position: relative; left: 0; display: block; margin: 0; padding: 5px 10px; width: auto; white-space: nowrap; text-align: left; text-decoration: none; background: #FFFFFF; color: #2875DE; font: 11pt Calibri, Verdana, Arial, Geneva, sans-serif } #sddm div a:hover { background: #66aadd; color: #FFFFFF } </style></html>


MRes Case Study 2

R Exercise 2 (ODE Solver)


RK4 solver:

  1. RK4 documentation
  2. Interface: rk4(y, times, func, parms, ...)
  3. Type >library(odesolve) to load the library that includes rk4

Model: Constitutive gene expression

  1. ODE System:
    • d[mRNA]/dt = k_1 - d_1*[mRNA]
    • d[protein]/dt = k_2[mRNA] -d_2*[protein]

Questions:

  • 1. Considering that the half-life for the mRNA and the protein is respectively 3min and 1h. Workout the values of (k_1, d_1, k_2, d_2) so that, at steady state, [mRNA] = 3 and [protein] = 500.

Using the relationship degradation rate = ln2 / half-life we get values of d1 = 0.23 and d2 = 0.012. At steady state, d[mRNA]/dt and d[Protein]/dt are set to 0. Rearranging gives

[mRNA]=k1/d1
k2/d2=[Protein]/[mRNA]

substituting in values of d1, d2 [mRNA] and [Protein] we find k1 = 3*0.23 = 0.69 and k2 = 0.012*500/3 = 2

  • 2. Using the previously found parameter values, plot on the same graph [mRNA](t) and [protein](t) for t=[0, 5h].

Concentrations at time t can be found using a step function as below:

ODE <- function(k1,d1,k2,d2,mrna,protein,t) {
for (i in 1:t) {
protein <- protein+k2*mrna-d2*protein
mrna <- mrna+k1-d1*mrna
}
cat("        t =",t,"\n")
cat("   [mRNA] =",mrna,"\n")
cat("[Protein] =",protein,"\n")
}
ODE(0.69,0.23,2,0.012,0,0,300)
        t = 300 
   [mRNA] = 3 
[Protein] = 485.8966

this uses the parameters from above to output the values of [mRNA] and [Protein] at time t (where t is in minutes). Saving the values of t, [mRNA] and [Protein] after every step into concatenated lists, then saving those as a data set, would give me something to graph... But this doesn't use rk4!

  • 3. Parameter scanning: Consider parameter d_2 to vary [-20%, 20%] of its nominal value (10 uniformly spread values). Generate on the same graph the 10 [protein](t) trajectories (t=[0, 5h]).

Intro

Links:

Inputs:

  • Wavelength
  • Intensity
  • Stimulation time (pulse length)

Outputs:

  • Viability of cells (bearing in mind YtvA pathway triggers stress response)
  • PoPs
References
  1. One
  2. Two
  3. Three
  4. Four
  5. Five