Difference between revisions of "Team:Aix-Marseille/Collaborations"

(Progamming code)
 
(190 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{:Team:Aix-Marseille/Template-Top|Collaborations}}
 
{{:Team:Aix-Marseille/Template-Top|Collaborations}}
 
+
<html><script src="https://2015.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
 +
<script type="text/x-mathjax-config">
 +
MathJax.Hub.Config({
 +
  TeX: { equationNumbers: { autoNumber: "AMS" } },
 +
  tex2jax: {
 +
    inlineMath: [['$','$'], ['\\(','\\)']],
 +
    processEscapes: true
 +
  }
 +
});
 +
</script>
 +
</html>
 
== Our collaborations ==
 
== Our collaborations ==
  
 
=== Modeling for [https://2016.igem.org/Team:Toulouse_France Toulouse 2016] ===
 
=== Modeling for [https://2016.igem.org/Team:Toulouse_France Toulouse 2016] ===
  
===='''Introduction'''====
+
[[File:T--Aix-Marseille--Toulouse_logo.jpg|link=https://2016.igem.org/Team:Toulouse_France|300px|350px|center]]
We conceived a model in order to handle questions concerning the following situation:
+
A bacterial growth is carried out in a bioreactor, continually supplied in substrate.
+
Bacteria can possess 2 type of plasmids:
+
* plasmids 1 carry the toxin A gene and the anti-toxin B gene
+
* plasmids 2 carry the toxin B gene and the anti-toxin A gene
+
  
So during the growth each bacterium can have no plasmids, either one type of plasmids, or both types.  
+
[https://2016.igem.org/Team:Toulouse_France/Collaborations In collaboration with the iGEM team Toulouse], we conceived '''[[Team:Aix-Marseille/Model|a model of plasmid loss]]''' for the Toulouse team.
  
The aim of the model is to assess the evolution of plasmids throughout the culture, to determine which parameters can matter in the loss of those plasmids, and to precise what are the probabilities for a bacteria to loose its plasmids during cell division.
+
=== Data recovery [https://2016.igem.org/Team:Bordeaux Bordeaux 2016] ===
As a plasmids can be a disadvantage for growth (energy spent into replicating processes) or a advantage (protection against a toxin) this question is hard to answer. But in this situation, where  one type of plasmid can influence on the  presence of the other type of plasmid in (and reciprocally) in the same bacteria, the question become too tough to answer and only a mathematical model can resolve such a interrogation!
+
  
===='''Equations'''====
+
[[File:T--Aix-Marseille--Bordeaux_logo.jpg|300px|350px|center|link=https://2016.igem.org/Team:Bordeaux]]
EQUATIONS DE 1 A 17
+
  
===='''Progamming code'''====
+
In order to help the [https://2016.igem.org/Team:Bordeaux/Collaborations iGEM team Bordeaux], we extract data from the paper <b>« Dynamics of plasmid transfer on surfaces »</b> <ref name="Dynamic">[http://www.microbiologyresearch.org/docserver/fulltext/micro/136/6/mic-136-6-1001.pdf?expires=1476877711&id=id&accname=guest&checksum=2F0A0D5E398EA4193E7D9B5926D0CCE5 Lone Simonse Department of Zoology, University of Massachusetts, Amherst, MA 01003, USA .]</ref> and organize those data about their experiments on plasmids transfer. Thanks to this, the iGEM team Bordeaux can compare those results to their own computationnal results.
  
<html>
+
[https://2016.igem.org/Team:Aix-Marseille/Collaborations/Bordeaux Here is a summary of this article.]
<style>
+
 
+
.code_collab{
+
    display:none;
+
}
+
 
+
.code_collab.target{
+
    display:block;
+
}
+
 
+
</style>
+
 
+
<div class="code_collab" id="code_collab">
+
<p>/*
+
* Program to run a model of bacteria in a fermenter
+
* with a 2 plasmid contention system.
+
*/
+
 
+
#include <stdio.h>
+
#include <stdlib.h>
+
#include <string.h>
+
#include <stdint.h>
+
#include <sys/time.h>
+
#include <gsl/gsl_rng.h>
+
#include <gsl/gsl_randist.h>
+
#include <gsl/gsl_sf.h>
+
#include <math.h>
+
 
+
#define MAX_POPULATION 2E6
+
 
+
// Model parameters
+
//
+
// Fermentation variables
+
double Sf    = 10.; // Substrate concentration (g/l) in feed solution
+
double S      =  0.19; // Current substrate concentration in fementer (g/l)
+
double V      =  0.01;  // Simulation volume with about 10^6 bacteria in ml
+
double Vtot  = 100.; // Volume of fermenter
+
double D      = 100.; // Dilution rate ml/hr
+
double alpha  = 3.4e-11;// growth yield g of substrate needed for 10^6 cells
+
double mumax  =  3.0; // maximum growth rate on substrate doublings per hour
+
double KS    =  0.1; // Monod constant for substrate (g/l)
+
    //
+
    // Plasmid 1 parameters
+
double KZ1    =100.0; // Growth inhibition constant
+
int    M1    =    1; // Hill constant for growth inhibition
+
double k1    = 20.0; // Plasmid replication rate in hr^-1
+
double K1    =  0.1; // Plasmid replication inhibition constant
+
double Z1max  = 10.0; // Maximum plsmid copy number
+
    //
+
    // Plasmid 2 parameters
+
double KZ2    =100.0; // Growth inhibition constant
+
int    M2    =    1; // Hill constant for growth inhibition
+
double k2    = 20.0; // Plasmid replication rate in hr^-1
+
double K2    =  0.1; // Plasmid replication inhibition constant
+
double Z2max  = 10.0; // Maximum plsmid copy number
+
    //
+
double sigma  =  5.0; // Division rate for large cells in hr^-1
+
    //
+
    // Contention system parameters
+
double ka1    =  2.0; // Toxicity parameter for toxin on plasmid 1
+
double ka2    =  1.0; // Toxicity parameter for toxin on plasmid 2
+
double kb    =  2.0; // Ratio of anti-toxin to toxin production rates
+
    //
+
    // Integrator parameters
+
size_t total  = 1e6;  // Total number of bacteria at start
+
double tmax  = 100.0; // Number of hours to simulate
+
double dt    = 0.05; // Timestep in hours
+
double t  = 0.0; // Current time
+
 
+
double michaelis(double Vmax, double Km, double S)
+
{
+
return Vmax * S /(Km+S);
+
}
+
 
+
gsl_rng *r;
+
 
+
void setup_seed()
+
{
+
const gsl_rng_type * T;
+
 
+
gsl_rng_env_setup();
+
T = gsl_rng_default;
+
+
struct timeval tv;
+
gettimeofday(&tv,0);
+
gsl_rng_default_seed = tv.tv_sec + tv.tv_usec;
+
r = gsl_rng_alloc(T);
+
}
+
 
+
struct bstate { double Z[3]; } *population = NULL;
+
size_t pop_size = 0;
+
 
+
void pop_alloc(void)
+
{
+
population = calloc(MAX_POPULATION, sizeof(struct bstate));
+
if (population == NULL) {
+
fprintf(stderr, "%s: alloc error\n", __func__);
+
exit(1);
+
}
+
}
+
 
+
void pop_append(struct bstate *p)
+
{
+
if (pop_size == MAX_POPULATION) {
+
fprintf(stderr, "%s: max population reached\n", __func__);
+
exit(1);
+
}
+
population[pop_size++] = *p;
+
}
+
 
+
/* pop_delete(i)
+
* overwrite population[i] with last element
+
* decrement pop_size
+
*/
+
void pop_delete(size_t i)
+
{
+
if (i >= pop_size) {
+
fprintf(stderr, "%s: out of range\n", __func__);
+
exit(1);
+
}
+
+
population[i] = population[--pop_size];
+
}
+
 
+
void printZ(double Z[])
+
{
+
for (int i = 0; i < 3; i++)
+
printf("%lf ", Z[i]);
+
printf("\n");
+
}
+
 
+
int main(void)
+
{
+
setup_seed();
+
 
+
/*
+
* Create a random population of bacteria
+
* in parameter space Z0(1-2),Z1(0-Z1max),Z2(0-Z2max)
+
*/
+
puts("Creating initial population");
+
pop_alloc();
+
+
double AvZ[3] = {0};
+
double growth = 0.0;
+
uintmax_t free = 0;
+
 
+
for (size_t i = 0; i < total; i++) {
+
struct bstate bacteria = {{
+
1+gsl_rng_uniform(r), // Random size [1-2]
+
Z1max, // Maximum number of plasmids
+
Z2max // for both types
+
}};
+
pop_append(&bacteria);
+
 
+
AvZ[0] += bacteria.Z[0];
+
AvZ[1] += bacteria.Z[1];
+
AvZ[2] += bacteria.Z[2];
+
}
+
 
+
puts("Starting integrator");
+
 
+
while (t < tmax) {
+
/*
+
* Display or output for visualization
+
* population (density on Z1/Z2 (all Z0 or Z0>2),
+
*/
+
printf("%lf %lf %lf %zu %ju %lf %lf %lf\n",
+
t, V, S, pop_size, free,
+
AvZ[0]/pop_size, AvZ[1]/pop_size, AvZ[2]/pop_size);
+
 
+
memset(AvZ, 0, sizeof(double[3])); // average values for parameters
+
growth = 0;
+
free = 0; // number of bacteria with no plasmids
+
+
size_t i = pop_size;
+
while (i-- != 0) {
+
double* Z = population[i].Z;
+
double cntrl  = gsl_rng_uniform(r) - (dt * D / Vtot);
+
if (cntrl < 0) {
+
pop_delete(i); // Bacterium washout
+
continue;
+
}
+
// Bacteria grow
+
AvZ[0] += Z[0];
+
AvZ[1] += Z[1];
+
AvZ[2] += Z[2];
+
+
if (Z[1] == 0.0 && Z[2] == 0.0)
+
free++;
+
 
+
double dotZ0  = michaelis( mumax, KS, S ); // Growth on substrate
+
dotZ0 *= michaelis( 1.0, gsl_sf_pow_int(Z[1], M1), KZ1 ); // Inhibition by plasmid 1
+
dotZ0 *= michaelis( 1.0, gsl_sf_pow_int(Z[2], M2), KZ2 ); // Inhibition by plasmid 2
+
double tox1 = gsl_sf_exp(-ka1*(Z[1]-kb*Z[2] ));
+
double tox2 = gsl_sf_exp(-ka2*(Z[2]-kb*Z[1] ));
+
dotZ0 *= fmin(1.0, tox1); // Inhibition by toxin 1
+
dotZ0 *= fmin(1.0, tox2); // Inhibition by toxin 2
+
+
double dotZ1 = (Z[1] < 1.0)? 0.0 : michaelis( k1, K1, Z[0] ) * (Z1max - Z[1]);
+
double dotZ2 = (Z[2] < 1.0)? 0.0 : michaelis( k2, K2, Z[0] ) * (Z2max - Z[2]);
+
 
+
Z[0] += dt * dotZ0; // Increment the internal state
+
Z[1] += dt * dotZ1;
+
Z[2] += dt * dotZ2;
+
+
growth += dt * dotZ0;
+
+
if (cntrl < (dt * sigma) && Z[0] > 2.0) {
+
struct bstate new_bacterium = {{
+
gsl_ran_gaussian_ziggurat(r, 0.05) + Z[0]/2.0,
+
gsl_ran_binomial(r, 0.5, Z[1]),
+
gsl_ran_binomial(r, 0.5, Z[2])
+
}};
+
for (int j = 0; j < 2; j++)
+
Z[j] -= new_bacterium.Z[j];
+
pop_append(&new_bacterium);
+
}
+
}
+
+
S += (D*dt*(Sf-S)/1000 - (growth*alpha*Vtot/V))/Vtot;
+
+
if (pop_size > 16e5) { // Too many bacteria
+
// Throw out half of then and reduce the volume
+
pop_size /= 2;
+
V      /= 2.0;
+
AvZ[0] /= 2.0;
+
AvZ[1] /= 2.0;
+
AvZ[2] /= 2.0;
+
}
+
if ((pop_size < 7e5) && (V < Vtot/2.0)) {
+
// Too few bacteria increase the volume
+
// and double the bacteria
+
memcpy(population + pop_size, population, pop_size);
+
pop_size *= 2;
+
V      *= 2.0;
+
AvZ[0] *= 2.0;
+
AvZ[1] *= 2.0;
+
AvZ[2] *= 2.0;
+
}
+
t += dt; // Increment time
+
}
+
// Output final population
+
return 0;
+
}</p></div>
+
</html>
+
 
+
===='''Results'''====
+
METTRE LES COURBE
+
 
+
=== Data recovery [https://2016.igem.org/Team:Bordeaux Bordeaux 2016] ===
+
 
+
[[File:T--Aix-Marseille--Bordeaux_logo.jpg|300px|350px|center]]
+
 
+
In order to help the iGEM team Bordeaux, we had to read the paper <b>« Dynamics of plasmid transfer on surfaces »</b> and collect and organize some data about their experiments on plasmids transfer. Thanks to this, the iGEM team Bordeaux can compare those results to their own computaionnal results.
+
  
 
== Colaboration made by [https://2016.igem.org/Team:Pretoria_UP Pretoria 2016] ==
 
== Colaboration made by [https://2016.igem.org/Team:Pretoria_UP Pretoria 2016] ==
  
<h3>★  ALERT! </h3>
+
[[File:Pretoria_UP_WattsAptamer_Logo_Transparent_White.png|300px|350px|center|link=https://2016.igem.org/Team:Pretoria_UP]]
<p>This page is used by the judges to evaluate your team for the <a href="https://2016.igem.org/Judging/Medals">team collaboration silver medal criterion</a>. </p>
+
 
+
<p> Delete this box in order to be evaluated for this medal. See more information at <a href="https://2016.igem.org/Judging/Evaluated_Pages/Instructions"> Instructions for Evaluated Pages </a>.</p>
+
 
+
<p>
+
Sharing and collaboration are core values of iGEM. We encourage you to reach out and work with other teams on difficult problems that you can more easily solve together.
+
</p>
+
  
<h4> Which other teams can we work with? </h4>
+
[https://2016.igem.org/Team:Pretoria_UP/Collaborations The iGEM team Pretoria 2016] hepled us focusing on the socio-economic and political issues facing the current platinum sector, including the Marikana strikes.
<p>
+
You can work with any other team in the competition, including software, hardware, high school and other tracks. You can also work with non-iGEM research groups, but they do not count towards the iGEM team collaboration silver medal criterion.
+
</p>
+
  
<p>
+
You can find their work [https://2016.igem.org/Team:Aix-Marseille/Integrated_Practices/Mines here].
In order to meet the silver medal criteria on helping another team, you must complete this page and detail the nature of your collaboration with another iGEM team.
+
</p>
+
  
<p>
+
<references/>
Here are some suggestions for projects you could work on with other teams:
+
</p>
+
  
<ul>
+
{{:Team:Aix-Marseille/Template-Footer}}
<li> Improve the function of another team's BioBrick Part or Device</li>
+
<li> Characterize another team's part </li>
+
<li> Debug a construct </li>
+
<li> Model or simulating another team's system </li>
+
<li> Test another team's software</li>
+
<li> Help build and test another team's hardware project</li>
+
<li> Mentor a high-school team</li>
+
</ul>
+

Latest revision as of 00:18, 20 October 2016