00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "IngeWntSwatCellCycleOdeSystem.hpp"
00029 #include "CellwiseOdeSystemInformation.hpp"
00030
00031 IngeWntSwatCellCycleOdeSystem::IngeWntSwatCellCycleOdeSystem(unsigned hypothesis, double wntLevel, const CellMutationState& rMutationState)
00032 : AbstractOdeSystem(22)
00033 {
00034 if (hypothesis!=1u && hypothesis!=2u)
00035 {
00036 EXCEPTION("You must set up this cell cycle ODE system with hypothesis one or two.");
00037 }
00038 mHypothesis = hypothesis;
00039 mMutationState = rMutationState;
00040
00041 mpSystemInfo.reset(new CellwiseOdeSystemInformation<IngeWntSwatCellCycleOdeSystem>);
00042
00069 Init();
00070
00071 double d_d_hat = mDd + mXiD*wntLevel;
00072 double d_d_x_hat = mDdx + mXiDx*wntLevel;
00073 double d_x_hat = mDx + mXiX*wntLevel;
00074 double p_c_hat = mPc + mXiC*wntLevel;
00075
00076 double sigma_D = 0.0;
00077 double sigma_B = 0.0;
00078
00079 switch (mMutationState)
00080 {
00081 case HEALTHY:
00082 {
00083 break;
00084 }
00085 case LABELLED:
00086 {
00087 break;
00088 }
00089 case APC_ONE_HIT:
00090 {
00091 sigma_D = 0.5;
00092 break;
00093 }
00094 case APC_TWO_HIT:
00095 {
00096 sigma_D = 1.0;
00097 break;
00098 }
00099 case BETA_CATENIN_ONE_HIT:
00100 {
00101 sigma_B = 0.5;
00102 break;
00103 }
00104 default:
00105
00106 NEVER_REACHED;
00107 }
00108
00109
00110
00111 double steady_D = ((1.0-sigma_D)*mSd*mSx)/((1.0-sigma_D)*mSd*d_d_hat + d_x_hat*(d_d_hat + d_d_x_hat));
00112 SetInitialConditionsComponent(5u, steady_D);
00113
00114 double temp = (mSx*(d_d_hat+d_d_x_hat))/((1.0-sigma_D)*mSd*d_d_hat+d_x_hat*(d_d_hat+d_d_x_hat));
00115 SetInitialConditionsComponent(6u, temp);
00116
00117 double steady_Cf = ((mSc-mDc*mKd - mPu*steady_D)+sqrt(pow((mSc-mDc*mKd - mPu*steady_D),2) + (4.0*mSc*mDc*mKd)))/(2.0*mDc);
00118 temp = (mPu*steady_D*steady_Cf)/(mDu*(steady_Cf+mKd));
00119 SetInitialConditionsComponent(7u, temp);
00120
00121 double theta = mDc+ (mPu*steady_D)/(steady_Cf + mKd);
00122
00123 double steady_Co = ( mSc - p_c_hat - theta*mKc + sqrt(4.0*mSc*theta*mKc + pow((mSc - p_c_hat - theta*mKc),2)) )/(2.0*theta);
00124 SetInitialConditionsComponent(8u, steady_Co);
00125
00126 double steady_Cc = steady_Cf - steady_Co;
00127
00128 if ((steady_Cc < 0) && (steady_Cc+100*DBL_EPSILON > 0) )
00129 {
00130 steady_Cc = 0.0;
00131 }
00132 SetInitialConditionsComponent(9u, steady_Cc);
00133
00134 SetInitialConditionsComponent(12u, mSa/mDa);
00135
00136 SetInitialConditionsComponent(13u, mSa*mSca*steady_Co/(mDa*mDca));
00137
00138 SetInitialConditionsComponent(15u, mSt/mDt);
00139
00140 SetInitialConditionsComponent(16u, mSct*mSt*steady_Co/(mDt*mDct));
00141
00142 SetInitialConditionsComponent(17u, mSct*mSt*steady_Cc/(mDt*mDct));
00143
00144 temp = (mSct*mSt*mSy*steady_Cf)/(mDy*(mSct*mSt*steady_Cf + mDct*mDt*mKt));
00145 SetInitialConditionsComponent(20u, temp);
00146
00147 SetInitialConditionsComponent(21u, wntLevel);
00148 }
00149
00150 void IngeWntSwatCellCycleOdeSystem::SetMutationState(const CellMutationState& rMutationState)
00151 {
00152 mMutationState = rMutationState;
00153 }
00154
00155 IngeWntSwatCellCycleOdeSystem::~IngeWntSwatCellCycleOdeSystem(void)
00156 {
00157
00158 }
00159
00160 void IngeWntSwatCellCycleOdeSystem::Init()
00161 {
00162
00163 double k1 = 1.0;
00164 double k2 = 1.6;
00165 double k3 = 0.05;
00166 double k16 = 0.4;
00167 double k34 = 0.04;
00168 double k43 = 0.01;
00169 double k61 = 0.3;
00170 double k23 = 0.3;
00171 double a = 0.04;
00172 double J11 = 0.5;
00173 double J12 = 5.0;
00174 double J61 = 5.0;
00175 double J62 = 8.0;
00176 double J13 = 0.002;
00177 double J63 = 2.0;
00178 double Km1 = 0.5;
00179 double Km2 = 4.0;
00180 double Km4 = 0.3;
00181 double kp = 0.05;
00182 double phi_pRb = 0.005;
00183 double phi_E2F1 = 0.1;
00184 double phi_CycDi = 0.023;
00185 double phi_CycDa = 0.03;
00186 double phi_pRbp = 0.06;
00187
00188
00189 double mitogenic_factorF = 1.0/25.0;
00190
00191
00192 mk2d = k2/(Km2*phi_E2F1);
00193 mk3d = k3*mitogenic_factorF/(Km4*phi_E2F1);
00194 mk34d = k34/phi_E2F1;
00195 mk43d = k43/phi_E2F1;
00196 mk23d = k23*Km2/(Km4*phi_E2F1);
00197 mad = a/Km2;
00198 mJ11d = J11*phi_E2F1/k1;
00199 mJ12d = J12*phi_E2F1/k1;
00200 mJ13d = J13*phi_E2F1/k1;
00201 mJ61d = J61*phi_E2F1/k1;
00202 mJ62d = J62*phi_E2F1/k1;
00203 mJ63d = J63*phi_E2F1/k1;
00204 mKm1d = Km1/Km2;
00205 mkpd = kp/(Km2*phi_E2F1);
00206 mphi_r = phi_pRb/phi_E2F1;
00207 mphi_i = phi_CycDi/phi_E2F1;
00208 mphi_j = phi_CycDa/phi_E2F1;
00209 mphi_p = phi_pRbp/phi_E2F1;
00210 mk16d = k16*Km4/phi_E2F1;
00211 mk61d = k61/phi_E2F1;
00212 mPhiE2F1 = phi_E2F1;
00213
00214
00215 mSa = 20;
00216 mSca = 250;
00217 mSc = 25;
00218 mSct = 30;
00219 mSd = 100;
00220 mSt = 10;
00221 mSx = 10;
00222 mSy = 10;
00223 mDa = 2;
00224 mDca = 350;
00225 mDc = 1;
00226 mDct = 750;
00227 mDd = 5;
00228 mDdx = 5;
00229 mDt = 0.4;
00230 mDu = 50;
00231 mDx = 100;
00232 mDy = 1;
00233 mKc = 200;
00234 mKd = 5;
00235 mKt = 50;
00236 mPc = 0.0;
00237 mPu = 100;
00238 mXiD = 5;
00239 mXiDx = 5;
00240 mXiX = 200;
00241 if (mHypothesis==1)
00242 {
00243 mXiC = 0.0;
00244 }
00245 else
00246 {
00247 mXiC = 5000.0;
00248 }
00249 }
00250
00251 void IngeWntSwatCellCycleOdeSystem::EvaluateYDerivatives(double time, const std::vector<double> &rY, std::vector<double> &rDY)
00252 {
00253 double r = rY[0];
00254 double e = rY[1];
00255 double i = rY[2];
00256 double j = rY[3];
00257 double p = rY[4];
00258
00259 double dx1 = 0.0;
00260 double dx2 = 0.0;
00261 double dx3 = 0.0;
00262 double dx4 = 0.0;
00263 double dx5 = 0.0;
00264
00265
00266
00267
00268 double D = rY[5];
00269 double X = rY[6];
00270 double Cu = rY[7];
00271 double Co = rY[8];
00272 double Cc = rY[9];
00273 double Mo = rY[10];
00274 double Mc = rY[11];
00275 double A = rY[12];
00276 double Ca = rY[13];
00277 double Ma = rY[14];
00278 double T = rY[15];
00279 double Cot = rY[16];
00280 double Cct = rY[17];
00281 double Mot = rY[18];
00282 double Mct = rY[19];
00283 double Y = rY[20];
00284 double stimulus_wnt = rY[21];
00285
00286
00287 double Cf = Cc+Co;
00288 double Ct = Cct+Cot;
00289 double Mf = Mc+Mo;
00290 double Mt = Mct+Mot;
00291
00292 double d_d_hat = mDd + mXiD*stimulus_wnt;
00293 double d_d_x_hat = mDdx + mXiDx*stimulus_wnt;
00294 double d_x_hat = mDx + mXiX*stimulus_wnt;
00295 double p_c_hat = mPc + mXiC*stimulus_wnt;
00296
00297 double sigma_D = 0.0;
00298 double sigma_B = 0.0;
00299
00300 switch (mMutationState)
00301 {
00302 case HEALTHY:
00303 {
00304 break;
00305 }
00306 case LABELLED:
00307 {
00308 break;
00309 }
00310 case APC_ONE_HIT:
00311 {
00312 sigma_D = 0.5;
00313 break;
00314 }
00315 case APC_TWO_HIT:
00316 {
00317 sigma_D = 1.0;
00318 break;
00319 }
00320 case BETA_CATENIN_ONE_HIT:
00321 {
00322 sigma_B = 0.5;
00323 break;
00324 }
00325 default:
00326
00327 NEVER_REACHED;
00328 }
00329
00330
00331
00332
00333 dx1 = e/(mKm1d+e)*mJ11d/(mJ11d+r)*mJ61d/(mJ61d+p) - mk16d*r*j+mk61d*p-mphi_r*r;
00334
00335 dx2 = mkpd+mk2d*(mad*mad+e*e)/(1+e*e)*mJ12d/(mJ12d+r)*mJ62d/(mJ62d+p) - e;
00336
00337 dx3 = mk3d*(Ct+Mt) + mk23d*e*mJ13d/(mJ13d+r)*mJ63d/(mJ63d+p) + mk43d*j - mk34d*i*j/(1+j) - mphi_i*i;
00338
00339 dx4 = mk34d*i*j/(1+j) - (mk43d+mphi_j)*j;
00340
00341 dx5 = mk16d*r*j - mk61d*p - mphi_p*p;
00342
00343 double factor = mPhiE2F1*60.0;
00344
00345 rDY[0] = dx1*factor;
00346 rDY[1] = dx2*factor;
00347 rDY[2] = dx3*factor;
00348 rDY[3] = dx4*factor;
00349 rDY[4] = dx5*factor;
00350
00351
00352 rDY[5] = (1.0-sigma_D)*mSd*X - (d_d_hat + d_d_x_hat)*D;
00353 rDY[6] = mSx - (1.0-sigma_D)*mSd*X - d_x_hat*X + d_d_x_hat*D;
00354 rDY[7] = (mPu*D*Cf)/(Cf+mKd) - mDu*Cu;
00355
00356 rDY[8] = (1.0-sigma_B)*mSc + mDca*Ca + mDct*Cot - (mSca*A + mSct*T + mDc)*Co
00357 - (p_c_hat*Co)/(Co + Mo + mKc) - (mPu*D*Co)/(Cf+mKd);
00358
00359 rDY[9] = (p_c_hat*Co)/(Co + Mo + mKc) + mDct*Cct - (mSct*T + mDc)*Cc
00360 - (mPu*D*Cc)/(Cf+mKd);
00361
00362 rDY[10] = sigma_B*mSc + mDca*Ma + mDct*Mot - (mSca*A + mSct*T + mDc)*Mo
00363 - (p_c_hat*Mo)/(Co + Mo + mKc);
00364
00365 rDY[11] = (p_c_hat*Mo)/(Co + Mo + mKc) + mDct*Mct - (mSct*T + mDc)*Mc;
00366 rDY[12] = mSa + mDca*(Ca+Ma) - (mSca*(Co+Mo) + mDa)*A;
00367 rDY[13] = mSca*Co*A - mDca*Ca;
00368 rDY[14] = mSca*Mo*A - mDca*Ma;
00369 rDY[15] = mSt + mDct*(Ct+Mt) - mSct*(Cf+Mf)*T - mDt*T;
00370 rDY[16] = mSct*Co*T - mDct*Cot;
00371 rDY[17] = mSct*Cc*T - mDct*Cct;
00372 rDY[18] = mSct*Mo*T - mDct*Mot;
00373 rDY[19] = mSct*Mc*T - mDct*Mct;
00374 rDY[20] = (mSy*(Ct+Mt))/(Ct + Mt + mKt) - mDy*Y;
00375 rDY[21] = 0.0;
00376 }
00377
00378 CellMutationState& IngeWntSwatCellCycleOdeSystem::rGetMutationState()
00379 {
00380 return mMutationState;
00381 }
00382
00383 bool IngeWntSwatCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double> &rY)
00384 {
00385
00386 std::vector<double> dy(rY.size());
00387 EvaluateYDerivatives(time, rY, dy);
00388
00389 return (rY[1] > 1.0 && dy[1] > 0.0);
00390 }
00391
00392 double IngeWntSwatCellCycleOdeSystem::CalculateRootFunction(double time, const std::vector<double> &rY)
00393 {
00394
00395 return rY[1]-1.0;
00396 }
00397
00398
00399 template<>
00400 void CellwiseOdeSystemInformation<IngeWntSwatCellCycleOdeSystem>::Initialise(void)
00401 {
00402 this->mVariableNames.push_back("pRb");
00403 this->mVariableUnits.push_back("non_dim");
00404 this->mInitialConditions.push_back(7.357000000000000e-01);
00405
00406 this->mVariableNames.push_back("E2F1");
00407 this->mVariableUnits.push_back("non_dim");
00408 this->mInitialConditions.push_back(1.713000000000000e-01);
00409
00410 this->mVariableNames.push_back("CycD_i");
00411 this->mVariableUnits.push_back("non_dim");
00412 this->mInitialConditions.push_back(6.900000000000001e-02);
00413
00414 this->mVariableNames.push_back("CycD_a");
00415 this->mVariableUnits.push_back("non_dim");
00416 this->mInitialConditions.push_back(3.333333333333334e-03);
00417
00418 this->mVariableNames.push_back("pRb_p");
00419 this->mVariableUnits.push_back("non_dim");
00420 this->mInitialConditions.push_back(1.000000000000000e-04);
00421
00422 this->mVariableNames.push_back("D");
00423 this->mVariableUnits.push_back("nM");
00424 this->mInitialConditions.push_back(NAN);
00425
00426 this->mVariableNames.push_back("X");
00427 this->mVariableUnits.push_back("nM");
00428 this->mInitialConditions.push_back(NAN);
00429
00430 this->mVariableNames.push_back("Cu");
00431 this->mVariableUnits.push_back("nM");
00432 this->mInitialConditions.push_back(NAN);
00433
00434 this->mVariableNames.push_back("Co");
00435 this->mVariableUnits.push_back("nM");
00436 this->mInitialConditions.push_back(NAN);
00437
00438 this->mVariableNames.push_back("Cc");
00439 this->mVariableUnits.push_back("nM");
00440 this->mInitialConditions.push_back(NAN);
00441
00442 this->mVariableNames.push_back("Mo");
00443 this->mVariableUnits.push_back("nM");
00444 this->mInitialConditions.push_back(0.0);
00445
00446 this->mVariableNames.push_back("Mc");
00447 this->mVariableUnits.push_back("nM");
00448 this->mInitialConditions.push_back(0.0);
00449
00450 this->mVariableNames.push_back("A");
00451 this->mVariableUnits.push_back("nM");
00452 this->mInitialConditions.push_back(NAN);
00453
00454 this->mVariableNames.push_back("Ca");
00455 this->mVariableUnits.push_back("nM");
00456 this->mInitialConditions.push_back(NAN);
00457
00458 this->mVariableNames.push_back("Ma");
00459 this->mVariableUnits.push_back("nM");
00460 this->mInitialConditions.push_back(0.0);
00461
00462 this->mVariableNames.push_back("T");
00463 this->mVariableUnits.push_back("nM");
00464 this->mInitialConditions.push_back(NAN);
00465
00466 this->mVariableNames.push_back("Cot");
00467 this->mVariableUnits.push_back("nM");
00468 this->mInitialConditions.push_back(NAN);
00469
00470 this->mVariableNames.push_back("Cct");
00471 this->mVariableUnits.push_back("nM");
00472 this->mInitialConditions.push_back(NAN);
00473
00474 this->mVariableNames.push_back("Mot");
00475 this->mVariableUnits.push_back("nM");
00476 this->mInitialConditions.push_back(0.0);
00477
00478 this->mVariableNames.push_back("Mct");
00479 this->mVariableUnits.push_back("nM");
00480 this->mInitialConditions.push_back(0.0);
00481
00482 this->mVariableNames.push_back("Y");
00483 this->mVariableUnits.push_back("nM");
00484 this->mInitialConditions.push_back(NAN);
00485
00486 this->mVariableNames.push_back("Sw");
00487 this->mVariableUnits.push_back("nM");
00488 this->mInitialConditions.push_back(NAN);
00489
00490 this->mInitialised = true;
00491 }