Difference between revisions of "Team:Toronto/Analysis"

Line 29: Line 29:
 
<div id="subsection-Introduction" class="subsection">
 
<div id="subsection-Introduction" class="subsection">
 
<h2 class="text-yellow">Introduction</h2>
 
<h2 class="text-yellow">Introduction</h2>
         <p>Using the previously derived expressions from the ODE team we use the Mathworks Simulink package to derive solutions to our system for a range of parameters. </p>
+
         <p>Using the previously derived expressions from our ODEs, we use the Mathworks Simulink package to derive solutions to our system for a range of parameters. </p>
 
<figure>
 
<figure>
 
<div class="figures">
 
<div class="figures">
<div class="image"><img src="https://static.igem.org/mediawiki/2017/8/88/T--Toronto--2017_simulation.svg" alt="data"></div>
+
<div class="image"><img src="https://2017.igem.org/File:T--Toronto--2017_CI.png" alt="data"></div>
<div class="image"><img src="https://static.igem.org/mediawiki/2017/8/8a/T--Toronto--2017_x2_light_on.svg" alt="data"></div>
+
    <div class="image"><img src="https://2017.igem.org/File:T--Toronto--2017_sgRNA.png" alt="data"></div>
<div class="image"><img src="https://static.igem.org/mediawiki/2017/7/7a/T--Toronto--2017_x2_light_off.svg" alt="data"></div>
+
<div class="image"><img src="https://2017.igem.org/File:T--Toronto--2017_anti_crispr.png" alt="data"></div>
<div class="image"><img src="https://static.igem.org/mediawiki/2017/d/d3/T--Toronto--2017_lambda_light_on.svg" alt="data"></div>
+
    <div class="image"><img src="https://2017.igem.org/File:T--Toronto--2017_ci_anti.png" alt="data"></div>
<div class="image"><img src="https://static.igem.org/mediawiki/2017/3/39/T--Toronto--2017_lambda_light_off.svg" alt="data"></div>
+
<div class="image"><img src="https://static.igem.org/mediawiki/2017/f/ff/T--Toronto--2017_theta_light_on.svg" alt="data"></div>
+
<div class="image"><img src="https://static.igem.org/mediawiki/2017/7/7a/T--Toronto--2017_theta_light_off.svg" alt="data"></div>
+
 
</div>
 
</div>
 
</figure>
 
</figure>
Line 46: Line 43:
 
<h2 class="text-yellow">ODE Solution</h2>
 
<h2 class="text-yellow">ODE Solution</h2>
 
         <p>Solving: </p>
 
         <p>Solving: </p>
<figure>
+
\begin{eqnarray}
  <div class="figures">
+
\frac{x_2}{dt} = \alpha - \gamma x_2 \\
    <div class="image"><img src="https://static.igem.org/mediawiki/2017/4/4c/T--Toronto--2017_eq1.png" alt="data"></div>
+
\frac{x_2}{dt} + \gamma x_2 = = \alpha
  </div>
+
\end{eqnarray}
</figure>
+
 
<p>Integrating Factor: </p>
 
<p>Integrating Factor: </p>
<figure>
+
\begin{eqnarray}
  <div class="figures">
+
e^(\int \gamma dt) = e^(\gamma t)
    <div class="image"><img src="https://static.igem.org/mediawiki/2017/e/e9/T--Toronto--2017_if.png" alt="data"></div>
+
\end{eqnarray}
  </div>
+
</figure>
+
 
<p>Multiplying both sides by our integrating factor: </p>
 
<p>Multiplying both sides by our integrating factor: </p>
<figure>
+
\begin{eqnarray}
  <div class="figures">
+
(\frac{x_2}{dt} + \gamma x_2)e^(\gamma t) = \alpha e^(\gamma t) \\
    <div class="image"><img src="https://static.igem.org/mediawiki/2017/4/48/T--Toronto--2017_eq2.png" alt="data"></div>
+
\int (\frac{x_2}{dt} + \gamma x_2)e^(\gamma t) = \int \alpha e^(\gamma t) \\
  </div>
+
x_2 = \frac{\alpha}{\gamma} + ce^(-\gamma t)
</figure>
+
\end{eqnarray}
 
</div>
 
</div>
  
 
<div id="subsection-Plots" class="subsection">
 
<div id="subsection-Plots" class="subsection">
 
<h2 class="text-yellow">R plots</h2>
 
<h2 class="text-yellow">R plots</h2>
 
+
Visit our <a href="https://github.com/igemuoftATG/drylab-matlab">GitHub repository</a> for our code.
<blockquote class="code">
+
<figure>
  <pre>// #reading data
+
<div class="figures">
table <- read_excel("C:/Users/Ali/Desktop/igem/Wiki Files/table2.xlsx")
+
<div class="image"><img src="https://static.igem.org/mediawiki/2017/6/66/T--Toronto--2017_mcherr_reg_log.png" alt="data"></div>
 
+
</div>
#Vectorizing Data
+
<figcaption>Figure 1.1: Log Linear transformation of RFU/OD600 vs Time, Regression Line (red) fitted to data</figcaption>
 
+
</figure>
time <- table$`RFU/OD600`[c(3:15)]
+
 
+
time <- as.numeric(time)
+
 
+
 
+
x1 <-table$X__1[c(3:15)]
+
 
+
x1 <- as.numeric(x1)
+
 
+
 
+
x2 <- table$X__2[c(3:15)]
+
x2 <- as.numeric(x2)
+
 
+
 
+
x3 <- table$X__3[c(3:15)]
+
x3 <- as.numeric(x3)
+
 
+
x <- c(x1,x2,x3)
+
 
+
time_ <- c(time,time,time)
+
#plotting data vs time
+
#plot(c(time,time,time), c(x1,x2,x3), xlab = 'Time', ylab = 'RFU/OD600')
+
 
+
#Transforming variable
+
 
+
log_x = log(x)
+
 
+
 
+
 
+
plot(c(time,time,time), log_x, xlab = 'Time', ylab = 'log(RFu/OD600)')
+
 
+
#regression model
+
 
+
fit <- lm(log(x) ~ c(time,time,time))
+
 
+
#regression information
+
summary(fit)
+
 
+
 
+
#graphing best fit line
+
abline(fit, col='red')
+
 
+
 
+
#orginal data points
+
 
+
plot(c(time,time,time), x, xlab='Time', ylab='RFu/OD600')
+
 
+
#transformed prediction line
+
 
+
time_val <- seq(min(time),max(time), by = 13/38)
+
 
+
#prediction
+
lm2 <- exp(predict(fit,list(time=time_val)))
+
 
+
 
+
#plotting prediction
+
 
+
lines(time_val, lm2[c(1:39)], col="red")
+
</pre>
+
</blockquote>
+
 
+
 
<figure>
 
<figure>
 
<div class="figures">
 
<div class="figures">
 
<div class="image"><img src="https://static.igem.org/mediawiki/2017/4/42/T--Toronto--2017_mcherry-reg-norm.png" alt="data"></div>
 
<div class="image"><img src="https://static.igem.org/mediawiki/2017/4/42/T--Toronto--2017_mcherry-reg-norm.png" alt="data"></div>
<div class="image"><img src="https://static.igem.org/mediawiki/2017/6/66/T--Toronto--2017_mcherr_reg_log.png" alt="data"></div>
 
 
</div>
 
</div>
 +
<figcaption>Figure 1.1: RFU/OD600 vs Time with Transfromed Regression Line (red)</figcaption>
 
</figure>
 
</figure>
 
</div>
 
</div>

Revision as of 01:40, 16 December 2017

Analysis

Introduction

Using the previously derived expressions from our ODEs, we use the Mathworks Simulink package to derive solutions to our system for a range of parameters.

data
data
data
data

ODE Solution

Solving:

\begin{eqnarray} \frac{x_2}{dt} = \alpha - \gamma x_2 \\ \frac{x_2}{dt} + \gamma x_2 = = \alpha \end{eqnarray}

Integrating Factor:

\begin{eqnarray} e^(\int \gamma dt) = e^(\gamma t) \end{eqnarray}

Multiplying both sides by our integrating factor:

\begin{eqnarray} (\frac{x_2}{dt} + \gamma x_2)e^(\gamma t) = \alpha e^(\gamma t) \\ \int (\frac{x_2}{dt} + \gamma x_2)e^(\gamma t) = \int \alpha e^(\gamma t) \\ x_2 = \frac{\alpha}{\gamma} + ce^(-\gamma t) \end{eqnarray}

R plots

Visit our GitHub repository for our code.
data
Figure 1.1: Log Linear transformation of RFU/OD600 vs Time, Regression Line (red) fitted to data
data
Figure 1.1: RFU/OD600 vs Time with Transfromed Regression Line (red)

R Analysis

R Analysis:
Call:
lm(formula = log(x) ~ c(time, time, time))

Residuals:
     Min       1Q   Median       3Q      Max
-0.58853 -0.15536  0.01303  0.19867  0.44055

Coefficients:
                    Estimate Std. Error t value Pr(>|t|)
(Intercept)          2.87199    0.21773   13.19 1.47e-15 ***
c(time, time, time)  0.15267    0.01142   13.37 9.74e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2935 on 37 degrees of freedom
Multiple R-squared:  0.8285,	Adjusted R-squared:  0.8238
F-statistic: 178.7 on 1 and 37 DF,  p-value: 9.741e-16

Intercept represents the equilibrium value of LacILov, our intercept:

data