Home > INIT > getINITSteps.m

getINITSteps

PURPOSE ^

getINITSteps

SYNOPSIS ^

function steps = getINITSteps(metsToIgnore, series)

DESCRIPTION ^

 getINITSteps
   Converts a reaction score to the gene expression (CPM or TPM) required 
   to get that reaction score, if the GPR is only a single gene.
   Useful function primarily in test cases, where you want to be able to
   define the reaction scores of rxns, but need to send in gene expression.
   Note that all combinations of steps will not work. In general, avoid 'exclude'
   if you want to define new ways to run the algorithm.

   metsToIgnore  Structure describing mets that can be removed from the model
                 before running ftINIT, such as water etc.
                 (optional, default [])
       simpleMets
           mets  Names of metabolites to remove
           compsToKeep Compartments for which metabolites should be kept.
   series        Describes the way to run ftINIT: 
                 '1+1'          Standard behavior. Step 1 and 2 described in
                                the paper are merged into 1.
                 '2+1'          The 3-step procedure described in the paper.
                                Faster and slightly less accurate than '1+1 steps'
                 '1+0'          Same as '1+1 steps', but skips step 3 in described 
                                in the paper. This will result in a model including 
                                a lot of reactions without GPRs. It is particularly 
                                useful for structural comparison, since the reactions 
                                removed in step 3 may be a bit random and doesn't 
                                really add any extra information. Faster than
                                '1+1 steps'
                 '2+0'          Same as '2+1 steps', but skips step 3 in described 
                                in the paper. Faster and slightly less accurate 
                                than '1+0 steps', but will yield similar results.
                 'full'         1-step run - similar to the old tINIT version but 
                                without simplifications. Accurate, but very slow.
                                This is mainly used for testing purposes.
                 (optional, default '1+1')

   steps         Cell array of steps, used as input to ftINIT

 Usage: steps = getINITSteps(metsToIgnore, series)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function steps = getINITSteps(metsToIgnore, series)
0002 % getINITSteps
0003 %   Converts a reaction score to the gene expression (CPM or TPM) required
0004 %   to get that reaction score, if the GPR is only a single gene.
0005 %   Useful function primarily in test cases, where you want to be able to
0006 %   define the reaction scores of rxns, but need to send in gene expression.
0007 %   Note that all combinations of steps will not work. In general, avoid 'exclude'
0008 %   if you want to define new ways to run the algorithm.
0009 %
0010 %   metsToIgnore  Structure describing mets that can be removed from the model
0011 %                 before running ftINIT, such as water etc.
0012 %                 (optional, default [])
0013 %       simpleMets
0014 %           mets  Names of metabolites to remove
0015 %           compsToKeep Compartments for which metabolites should be kept.
0016 %   series        Describes the way to run ftINIT:
0017 %                 '1+1'          Standard behavior. Step 1 and 2 described in
0018 %                                the paper are merged into 1.
0019 %                 '2+1'          The 3-step procedure described in the paper.
0020 %                                Faster and slightly less accurate than '1+1 steps'
0021 %                 '1+0'          Same as '1+1 steps', but skips step 3 in described
0022 %                                in the paper. This will result in a model including
0023 %                                a lot of reactions without GPRs. It is particularly
0024 %                                useful for structural comparison, since the reactions
0025 %                                removed in step 3 may be a bit random and doesn't
0026 %                                really add any extra information. Faster than
0027 %                                '1+1 steps'
0028 %                 '2+0'          Same as '2+1 steps', but skips step 3 in described
0029 %                                in the paper. Faster and slightly less accurate
0030 %                                than '1+0 steps', but will yield similar results.
0031 %                 'full'         1-step run - similar to the old tINIT version but
0032 %                                without simplifications. Accurate, but very slow.
0033 %                                This is mainly used for testing purposes.
0034 %                 (optional, default '1+1')
0035 %
0036 %   steps         Cell array of steps, used as input to ftINIT
0037 %
0038 % Usage: steps = getINITSteps(metsToIgnore, series)
0039 if nargin < 1
0040     metsToIgnore = [];
0041 end
0042 
0043 if nargin < 2
0044     series = '1+1';
0045 end
0046 
0047 if strcmp(series,'1+1') %step 1 and 2 are joined
0048     params1 = struct();
0049     params1.MIPGap = 0.0004;
0050     params1.TimeLimit = 120;
0051     params2 = struct();
0052     params2.MIPGap = 0.0030;
0053     params2.TimeLimit = 5000;
0054     params = {params1;params2};
0055     params3 = struct();
0056     params3.MIPGap = 0.0004;
0057     params3.TimeLimit = 5;
0058     paramsStep3 = {params3;params1;params2};
0059     %The paramsStep3 involves a quick first run. The objective value is often
0060     %small in the third step (~800), and 0.0004 of that is a very small number
0061     %With this first step, the rough value of the objective function will be
0062     %estimated, which will generate an absolute MIPGap limit that is much larger
0063     %for the second iteration.
0064     
0065     steps = { ...
0066         INITStepDesc(false, false, 'ignore', [1,1,1,1,1,1,1,0], metsToIgnore, params, {10;20}); ...
0067         INITStepDesc(false, false, 'essential', [1,0,0,0,1,0,0,0], metsToIgnore, paramsStep3, {10;10;20}); ...
0068         };
0069 elseif strcmp(series,'2+1') %the 3 step process described in the ftINIT paper
0070     params1 = struct();
0071     params1.MIPGap = 0.0004;
0072     params1.TimeLimit = 120;
0073     params2 = struct();
0074     params2.MIPGap = 0.0030;
0075     params2.TimeLimit = 5000;
0076     params = {params1;params2};
0077     params3 = struct();
0078     params3.MIPGap = 0.0004;
0079     params3.TimeLimit = 5;
0080     paramsStep3 = {params3;params1;params2};
0081     %The paramsStep3 involves a quick first run. The objective value is often
0082     %small in the third step (~800), and 0.0004 of that is a very small number
0083     %With this first step, the rough value of the objective function will be
0084     %estimated, which will generate an absolute MIPGap limit that is much larger
0085     %for the second iteration.
0086     
0087     steps = { ...
0088         INITStepDesc(true, true, 'ignore', [1,1,1,1,1,1,1,0], metsToIgnore, params, {10;20}); ...
0089         INITStepDesc(false, false, 'essential', [1,1,1,1,1,1,1,0], metsToIgnore, params, {10;20}); ...
0090         INITStepDesc(false, false, 'essential', [1,0,0,0,1,0,0,0], metsToIgnore, paramsStep3, {10;10;20}); ...
0091         };
0092 elseif strcmp(series,'1+0') %Joins step 1 and 2, skips step 3
0093     params1 = struct();
0094     params1.MIPGap = 0.0004;
0095     params1.TimeLimit = 120;
0096     params2 = struct();
0097     params2.MIPGap = 0.0030;
0098     params2.TimeLimit = 5000;
0099     params = {params1;params2};
0100     steps = { ...
0101         INITStepDesc(false, false, 'ignore', [1,1,1,1,1,1,1,0], metsToIgnore, params, {10;20}); ...
0102         };
0103 elseif strcmp(series,'2+0') %Skips step 3
0104     params1 = struct();
0105     params1.MIPGap = 0.0004;
0106     params1.TimeLimit = 120;
0107     params2 = struct();
0108     params2.MIPGap = 0.0030;
0109     params2.TimeLimit = 5000;
0110     params = {params1;params2};
0111     steps = { ...
0112         INITStepDesc(true, true, 'ignore', [1,1,1,1,1,1,1,0], metsToIgnore, params, {10;20}); ...
0113         INITStepDesc(false, false, 'essential', [1,1,1,1,1,1,1,0], metsToIgnore, params, {10;20}); ...
0114         };
0115 elseif strcmp(series,'full') %Just one run, slow on large models, but this is the 'perfect' setup
0116     params1 = struct();
0117     params1.MIPGap = 0.0004;
0118     params1.TimeLimit = 10000;
0119     params = {params1};
0120     steps = { ...
0121         INITStepDesc(false, false, 'ignore', [0,0,0,0,0,0,0,0], [], params) ...
0122         };
0123 else
0124     dispEM(['Invalid series in getINITSteps: ' series])
0125 end
0126 
0127 end

Generated by m2html © 2005