# Endy:F2620/Data Processing/Algorithm

## Background subtraction

We subtracted a media background, $\displaystyle{ A_{media} }$, from the raw absorbance data, $\displaystyle{ A_{raw} }$, and assumed that the resulting data, $\displaystyle{ A_{corrected} }$, was directly proportional to the number of cells in the well.

 $\displaystyle{ \frac{}{}A_{corrected} = A_{raw}-A_{media} }$ ...Equation 1

We subtracted a fluorescent protein-free cell background, $\displaystyle{ G_{cells} }$, from the the raw fluorescent data, $\displaystyle{ G_{raw} }$, and assumed that the resulting data $\displaystyle{ G_{corrected} }$ was proportional to the total number of GFP molecules in the well [include note here about immature GFP?].

 $\displaystyle{ \frac{}{}G_{corrected} = G_{raw}-G_{cells} }$ ...Equation 2

## Unit conversion

We then used standard calibration curves (see here for absorbance and here for fluorescence) to convert the background-corrected data into absolute units (CFU/well and GFP molecules per well). The calibration equations used are shown in Equations 3 & 4.

 $\displaystyle{ \frac{}{}CFU = 3.1e8 * A_{corrected} - 1.6e6 }$ ...Equation 3 $\displaystyle{ \frac{}{}GFP = 7.0e8 * G_{corrected} + 6.0e11 }$ ...Equation 4

## GFP synthesis rate calculations

To calculate the mean synthesis rate of GFP per cell, $\displaystyle{ S_{cell} }$, we assume the total GFP synthesis rate is equal to the time differential of $\displaystyle{ GFP }$. $\displaystyle{ S_{cell} }$ can be calculated as the total synthesis rate divided by $\displaystyle{ CFU }$.

 $\displaystyle{ \frac{}{}S_{total} = \frac{d[GFP]}{dt} }$ ...Equation 5 $\displaystyle{ \frac{}{}S_{cell} = \frac{S_{total}}{CFU} }$ ...Equation 6

## Ania's c++ code

• Load the data from the excel file. Read headers of the column to know the colony number and AHL type used. Form a lookup table. Separate the medium column at this point. Count how many repeats there is for each type.
• Find the GFP background by finding the non-induced column
• GFPpre-fit by fitting all the GFP background columns
• Fit medium for OD (find mean)
• For each OD subtract this mean (media)
• For each GFP we subtract the fitted background calculated for non-induced cells of this type (e.g. for cog-AHL we subtract fitted results for non induced cog-AHL from the raw data)
• Calibrate GFP relative units to conc of GFP (from Barry's calibration run): 1.16*10e-6*GFP+9.95*10e-4
• Fit GFP
• Fit OD (don't fit media anymore)
• Plot GFP, GFP/OD, dOD/dt, gamma, (GFP/OD)/dT, total sythesis and output (this is for debugging and outputs a huge .pdf and .tex)
• to params.csv outputs all the fitting parameters and errors (the errors are not really important)
• to surfaces.tsv output points for superimposed transfer functions in 3D (so you can plot the 3D surfaces yourself)
• evaluate the fitting equations for the total synthesis at many timepoints and select the hightest value from cog-AHL and store this time value.
• output to transfer.tsv all values of total function for all series at time calculated above and low/high repeat, st dev (Mathworld definition, I think it is what you call standard error), 95% confidence
• plot using gnuplot 3D superimposed lines "ser*.pdf" files (we don't use them anymore) surfaces (those are the green ones we post on wiki) into files "sersurf*.pdf") and the transfer functions to "tranfer.pdf" with 95% confidence intervals, transferlh.pdf transfer functions with low/high errors, where * is series number

Notes: 1. Evaluation of the total synthesis function is done using arbitrary precision numbers. B/c they exceeded double range