00001 #include "PC12RapMinusMinimizableDirector.h"
00002
00003 CPC12RapMinusMinimizableDirector::CPC12RapMinusMinimizableDirector(void)
00004 {
00005
00006 double maxSimTime = 91.0;
00007 double stepSize = 0.0001;
00008 double frequency = 1.0;
00009 int nCells = 1;
00010 double moveTol = 1.0e-06;
00011
00012 m_dGammaSquared = 0.0;
00013
00014
00015 bool rateFlag = true;
00016 bool chemFlag = false;
00017 bool logsFlag = false;
00018 double timeWeight = 1.0;
00019 double rateWeight = 0.0;
00020 double chemWeight = 0.0;
00021
00022 int cnt = 0;
00023
00024
00025
00026 _networkList.push_back(new CPC12RapMinusNetwork());
00027 _experimentList.push_back(new Experiment(_networkList[cnt],"EGF Stimulation 100 ng/ml - Traverse 1994"));
00028
00029 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/ErkMekTraverse2EGF.dat");
00030 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Raf1LandrethEGF.dat");
00031
00032 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00033
00034 _minimizableList.push_back(new SingleNetworkMinimizable());
00035
00036 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00037 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00038
00039 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00040 _plotterList[cnt]->SetTitle("Rap1 Minus Network:EGF Stimulation (100 ng/ml, T 1994):ODE");
00041 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00042 cnt++;
00043
00044
00045
00046 _networkList.push_back(new CPC12RapMinusNetwork());
00047 _experimentList.push_back(new Experiment(_networkList[cnt],"EGF Stimulation 100 ng/ml - Yao 1995"));
00048
00049 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Erk1HYaoEGF.dat");
00050
00051 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00052
00053 _minimizableList.push_back(new SingleNetworkMinimizable());
00054
00055 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00056 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00057
00058 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00059 _plotterList[cnt]->SetTitle("Rap1 Minus Network:EGF Stimulation (100 ng/ml, Y 1995):ODE");
00060 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00061 cnt++;
00062
00063
00064
00065 _networkList.push_back(new CPC12RapMinusNetwork());
00066 _experimentList.push_back(new Experiment(_networkList[cnt],"NGF Stimulation 50 ng/ml - T 1994"));
00067
00068 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/ErkMekTraverse2NGF.dat");
00069 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/RasGreen1NGF.dat");
00070
00071 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00072
00073 _minimizableList.push_back(new SingleNetworkMinimizable());
00074
00075 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00076
00077 _minimizableList[cnt]->GetConversionFactor(11)->SetFactorFixed(true);
00078 _minimizableList[cnt]->GetConversionFactor(11)->SetFactorValue(1.0/(0.2*600000*0.1));
00079 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00080
00081 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00082 _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (50 ng/ml, T 1994):ODE");
00083 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00084 cnt++;
00085
00086
00087
00088 _networkList.push_back(new CPC12RapMinusNetwork());
00089 _experimentList.push_back(new Experiment(_networkList[cnt],"NGF Stimulation 50 ng/ml - Yao 1995"));
00090
00091 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Erk1HYaoNGF.dat");
00092 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00093
00094 _minimizableList.push_back(new SingleNetworkMinimizable());
00095
00096 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00097 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00098
00099 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00100 _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (50 ng/ml, Y 1995):ODE");
00101 _minimizableList[cnt]->Attach(_plotterList[3]);
00102 cnt++;
00103
00104
00105
00106 _networkList.push_back(new CPC12RapMinusNetwork());
00107 _experimentList.push_back(new Experiment(_networkList[cnt],"EGF Stimulation 30 ng/ml"));
00108
00109 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/RasGreen1EGF.dat");
00110
00111 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00112
00113 _minimizableList.push_back(new SingleNetworkMinimizable());
00114
00115 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00116 _minimizableList[cnt]->GetConversionFactor(11)->SetFactorFixed(true);
00117 _minimizableList[cnt]->GetConversionFactor(11)->SetFactorValue(1.0/(0.2*600000*0.1));
00118 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00119
00120 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00121 _plotterList[cnt]->SetTitle("Rap1 Minus Network:EGF Stimulation (30 ng/ml):ODE");
00122 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00123 cnt++;
00124
00125
00126
00127
00128 _networkList.push_back(new CPC12RapMinusNetwork());
00129 _experimentList.push_back(new Experiment(_networkList[cnt],"NGF Stimulation 100 ng/ml"));
00130
00131 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Raf1LandrethNGF.dat");
00132
00133 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00134
00135 _minimizableList.push_back(new SingleNetworkMinimizable());
00136
00137 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00138 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00139
00140 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00141 _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (100 ng/ml):ODE");
00142 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00143 cnt++;
00144
00145
00146
00147 _networkList.push_back(new CPC12RapMinusNetwork());
00148 _experimentList.push_back(new Experiment(_networkList[cnt],"EGF at 100 ng/ml, 50-fold HER Overexpression"));
00149
00150 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/ErkMekTraverseHERover.dat");
00151 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00152
00153 _minimizableList.push_back(new SingleNetworkMinimizable());
00154
00155 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00156 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00157
00158 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00159 _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (100 ng/ml):ODE");
00160 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00161 cnt++;
00162
00163
00164
00165 int masterResidualsSize = 0;
00166 for(int i = 0; i < _minimizableList.size(); i++)
00167 {
00168 int subRes = _minimizableList[i]->GetNResiduals();
00169 masterResidualsSize += subRes;
00170 cout << subRes << " residuals in minimizable " << i << endl;
00171 }
00172 if(m_dGammaSquared > 0.0)
00173 {
00174 masterResidualsSize += 1;
00175 }
00176 Allocate(masterResidualsSize);
00177
00178 cout << "Master Residuals size : " << masterResidualsSize << endl;
00179
00180
00181 DefineExperiments();
00182
00183
00184
00185 }
00186
00187 CPC12RapMinusMinimizableDirector::~CPC12RapMinusMinimizableDirector(void)
00188 {
00189 for(int i = 0; i < _minimizableList.size(); i++)
00190 {
00191 if(_plotterList.size() > i)
00192 {
00193 _minimizableList[i]->Detach(_plotterList[i]);
00194 }
00195 }
00196 for(i = 0; i < _plotterList.size(); i++)
00197 {
00198 delete _plotterList[i];
00199 }
00200 }
00201
00202 void CPC12RapMinusMinimizableDirector::DefineExperiments()
00203 {
00204
00205 _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00206 _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00207 _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00208 _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00209
00210
00211 _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00212 _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00213 _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00214 _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00215
00216
00217 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00218 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00219 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00220 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00221
00222
00223 _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00224 _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00225 _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00226 _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00227
00228
00229 _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(3000600);
00230 _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00231 _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00232 _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00233
00234
00235 _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00236 _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00237 _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(456000.0);
00238 _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00239
00240
00241 _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00242 _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00243 _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00244 _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00245 double EGFR = _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(2)->GetInitialAmount();
00246 _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(2)->SetInitialAmount(50*EGFR);
00247 _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(2)->Reset();
00248
00249
00250 }
00251
00252 double CPC12RapMinusMinimizableDirector::GetParameter(int parIndex)
00253 {
00254
00255
00256 return _minimizableList[0]->GetParameter(parIndex);
00257 }
00258
00259 int CPC12RapMinusMinimizableDirector::GetNParameters()
00260 {
00261
00262 return _minimizableList[0]->GetNParameters();
00263 }