Team:Stanford/Research/Modeling

From 2010.igem.org

Revision as of 23:51, 27 October 2010 by Axva1663 (Talk | contribs)

Contents

Goals

Our intuition for what makes a good ratio sensor could only take us so far. From the very first stages of design, we wanted to back up and test our ideas with mathematical tools. Luckily, we found that solving the equations of mass action kinetics at steady-state was enough gave us clear design criteria. We present the mathematical basis for sensors that are capable of sensing a single ratio digitally, or many ratios in an analog fashion.

The System

Analog

Digital

Boolean model for the sRNA system. This is mean to provide a significantly simplified mathematical understanding of the dynamics involved.

iGEM_boolean_sRNA_model

clear all
clc

%Constants and Values
trackingNum = 6;    %mRNA_pA, mRNA_pB, sRNA_A, sRNA_B, protein_A, protein_B;
inputNum = 2;       %A, B;
processNum = 6;     %Trx_pA, Trx_sRNA_A, Trx_pB, Trx_sRNA_B, Trl_A, Trl_B;

%Cell/Matrix Dimensions
m = 2^trackingNum;
n = 2^inputNum;
c = cell(m+1, n+1);

trackingMatrix = de2bi(0:m-1);
inputMatrix = de2bi(0:n-1);
processMatrix = zeros(1,processNum);

%Populating the Cell (Tracking x Input)
c{1,1} = [0];
for j = 1
    for i = 2:m+1
        c{i,j} = trackingMatrix(i-1,:);
    end
end
for i = 1
    for j = 2:n+1
        c{i,j} = inputMatrix(j-1,:);
    end
end
for i = 2:m+1
    for j = 2:n+1
        c{i,j} = processMatrix;
    end
end

%Rules, Acessing, and Changing
for j = 2:n+1
    A = c{1,j}(1);
    B = c{1,j}(2);

    for i = 2:m+1
        mRNA_pA = c{i,1}(1);
        mRNA_pB = c{i,1}(2);
        sRNA_A = c{i,1}(3);
        sRNA_B = c{i,1}(4);
        protein_A = c{i,1}(5);
        protein_B = c{i,1}(6);

        %Trx_pA
        if A == 1
            c{i,j}(1) = 1;
        end

        %Trx_pB
        if B == 1
            c{i,j}(2) = 1;
        end

        %Trx_sRNA_A
        if A == 1
            c{i,j}(3) = 1;
        end

        %Trx_sRNA_B
        if B == 1
            c{i,j}(4) = 1;
        end

        %Trl_A
        if mRNA_pA == 1 && mRNA_pB == 0
            c{i,j}(5) = 1;
        end

        %Trl_B
        if mRNA_pB == 1 && mRNA_pA == 0
            c{i,j}(6) = 1;
        end

    end
end

%Display Results (Column by Column)
[nrows,ncols]= size(c);
%Condense Cell and Display
for i = 1:nrows
    for j = 1:ncols
        string = num2str(c{i,j});
        l = length(string);
        r = 1;
        s = 1;
        t = 0;

        while t ~= 1
            if r == l
            t = 1;
            end

            noSpacesString(s) = string(r);
            r = r+3;
            s = s+1;
        end
        c{i,j} = noSpacesString;
    end
end
c(:,:)

%Find Steady States and Corresponding Inputs
counter = 1;
for i = 2:m+1
    for j = 2:n+1
        if c{i,j} == c{i,1}
            completeMatrix{counter,1} = c{i,j};             %Steady state values
            completeMatrix{counter,2} = num2str([i-1,j-1]); %Location (n x m) within results area
            completeMatrix{counter,3} = c{1,j};             %Corresponding input values
            counter = counter+1;
        end
    end
end
SS_mXn_Input = completeMatrix

time = 0:processNum;
%plot(time,,time,,time,,time,,time,,time,)

%New Cell for Specific Cases
% d(:,1) = c(:,1);
% for j = 2:n+1
%     C1 = '0000';
%     C2 = '0011';
%     C3 = '0100';
%     C4 = '0111';
%     C5 = '1000';
%     C6 = '1011';
%     C7 = '1100';
%
%     a = {C1, C2, C3, C4, C5, C6, C7};
%     for b = 1:1:length(a)
%         if strcmp(c(1,j),a(b)) == 1
%             d(:,b+1) = c(:,j);
%         end
%     end
% end
% d
ans = 

  Columns 1 through 4

    '0'         '00'        '01'        '10'    
    '000000'    '000000'    '010100'    '101000'
    '000001'    '000000'    '010100'    '101000'
    '000010'    '000000'    '010100'    '101000'
    '000011'    '000000'    '010100'    '101000'
    '000100'    '000000'    '010100'    '101000'
    '000101'    '000000'    '010100'    '101000'
    '000110'    '000000'    '010100'    '101000'
    '000111'    '000000'    '010100'    '101000'
    '001000'    '000000'    '010100'    '101000'
    '001001'    '000000'    '010100'    '101000'
    '001010'    '000000'    '010100'    '101000'
    '001011'    '000000'    '010100'    '101000'
    '001100'    '000000'    '010100'    '101000'
    '001101'    '000000'    '010100'    '101000'
    '001110'    '000000'    '010100'    '101000'
    '001111'    '000000'    '010100'    '101000'
    '010000'    '000001'    '010101'    '101001'
    '010001'    '000001'    '010101'    '101001'
    '010010'    '000001'    '010101'    '101001'
    '010011'    '000001'    '010101'    '101001'
    '010100'    '000001'    '010101'    '101001'
    '010101'    '000001'    '010101'    '101001'
    '010110'    '000001'    '010101'    '101001'
    '010111'    '000001'    '010101'    '101001'
    '011000'    '000001'    '010101'    '101001'
    '011001'    '000001'    '010101'    '101001'
    '011010'    '000001'    '010101'    '101001'
    '011011'    '000001'    '010101'    '101001'
    '011100'    '000001'    '010101'    '101001'
    '011101'    '000001'    '010101'    '101001'
    '011110'    '000001'    '010101'    '101001'
    '011111'    '000001'    '010101'    '101001'
    '100000'    '000010'    '010110'    '101010'
    '100001'    '000010'    '010110'    '101010'
    '100010'    '000010'    '010110'    '101010'
    '100011'    '000010'    '010110'    '101010'
    '100100'    '000010'    '010110'    '101010'
    '100101'    '000010'    '010110'    '101010'
    '100110'    '000010'    '010110'    '101010'
    '100111'    '000010'    '010110'    '101010'
    '101000'    '000010'    '010110'    '101010'
    '101001'    '000010'    '010110'    '101010'
    '101010'    '000010'    '010110'    '101010'
    '101011'    '000010'    '010110'    '101010'
    '101100'    '000010'    '010110'    '101010'
    '101101'    '000010'    '010110'    '101010'
    '101110'    '000010'    '010110'    '101010'
    '101111'    '000010'    '010110'    '101010'
    '110000'    '000000'    '010100'    '101000'
    '110001'    '000000'    '010100'    '101000'
    '110010'    '000000'    '010100'    '101000'
    '110011'    '000000'    '010100'    '101000'
    '110100'    '000000'    '010100'    '101000'
    '110101'    '000000'    '010100'    '101000'
    '110110'    '000000'    '010100'    '101000'
    '110111'    '000000'    '010100'    '101000'
    '111000'    '000000'    '010100'    '101000'
    '111001'    '000000'    '010100'    '101000'
    '111010'    '000000'    '010100'    '101000'
    '111011'    '000000'    '010100'    '101000'
    '111100'    '000000'    '010100'    '101000'
    '111101'    '000000'    '010100'    '101000'
    '111110'    '000000'    '010100'    '101000'
    '111111'    '000000'    '010100'    '101000'

  Column 5

    '11'    
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111101'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111110'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'
    '111100'


SS_mXn_Input = 

    '000000'    '1  1'      '00'
    '010101'    '22   2'    '01'
    '101010'    '43   3'    '10'
    '111100'    '61   4'    '11'