IGEM:IMPERIAL/2008/Prototype/Drylab/Data Analysis/BSub Charac

From OpenWetWare

Jump to: navigation, search




Generating Bacteria Characteristics

Shape and Light Intensity

Real Bacteria
Synthetic Bacteria

The light intensity of the bacteria was assumed to vary with a normal distribution across frames. The body of each bacteria had a homogenous light intensity, while the membrane was lighter in intensity than the cell body. The shape of the bacteria was also assumed to vary with a normal distribution across frames. It is evident from microscopy videos that the bacteria are rod shaped, and may appear to change shape as they tumble along the z-axis. The intensity of the membrane was assumed to be half the light intensity of that of the cell body.

MATLAB Code

   %Generates Bacteria Shape and Color Intensity 
   function [bactshape,bactinten]=shape(nframes,dframe,L, W, SigSize, I, SigInt)
   
   %Where L and W are the length and width of bacteria and I is the intensity.
   %SigSize and SigInt are standard deviation in cell dimensions and intensity.
   %nframes is the total number of frames and dframe is the frame step for which 
   %cell transition takse place. Total number of frames must be a multiple of frame step
   
   %Determines Size of Array
   i=1:dframe:nframes;
   ShpSize=max(i)+dframe;
   
   %Initialising Parameters
   bactshape=zeros(ShpSize,3);   
   bactinten=zeros(ShpSize,1);
   
   %Generate step characteristics
   for n=1:dframe:ShpSize
       bactshape(n,1)=abs(normrnd(L,SigSize));
       bactshape(n,2)=abs(normrnd(W,SigSize));
       bactshape(n,3)=randraw('vonmises',[0,1]);
   
       %Ensures ColorSpec value to be from 0 to 1
       if bactinten(n,1)>64 || bactinten(n,2)>64
           bactinten(n,1)=I;
           bactinten(n,2)=I*2;
       end;
   end;
   
   %Generating Bacteria Size and Color Intensity
   for n=1:dframe:nframes
       for i=(n+1):(n+dframe-1)
           bactshape(i,:)=bactshape(i-1,:)+(bactshape(n+dframe,:)-bactshape(n,:))/dframe;
           bactinten(i,:)=bactinten(i-1,:)+(bactinten(n+dframe,:)-bactinten(n,:))/dframe;
       end;
   end;
   
   %Returns Bacinten in the form of ColorSpec
   bactinten=bactinten/64; 
   


    [[IGEM:IMPERIAL/2008/New/{{{1}}}|< Previous]]
    [[IGEM:IMPERIAL/2008/New/{{{2}}}|Next >]]

Personal tools