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