WntCellCycleOdeSystem.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 "WntCellCycleOdeSystem.hpp"
00037 #include "CellwiseOdeSystemInformation.hpp"
00038 #include "IsNan.hpp"
00039
00040
00041 #include "ApcOneHitCellMutationState.hpp"
00042 #include "ApcTwoHitCellMutationState.hpp"
00043 #include "BetaCateninOneHitCellMutationState.hpp"
00044
00045 WntCellCycleOdeSystem::WntCellCycleOdeSystem(double wntLevel,
00046 boost::shared_ptr<AbstractCellMutationState> pMutationState,
00047 std::vector<double> stateVariables)
00048 : AbstractOdeSystem(9),
00049 mpMutationState(pMutationState),
00050 mWntLevel(wntLevel)
00051 {
00052 mpSystemInfo.reset(new CellwiseOdeSystemInformation<WntCellCycleOdeSystem>);
00053
00068 Init();
00069
00070
00071 double destruction_level = ma5d/(ma4d*wntLevel+ma5d);
00072 double beta_cat_level_1 = -1.0;
00073 double beta_cat_level_2 = -1.0;
00074
00075 if (!mpMutationState)
00076 {
00077
00078 }
00079 else if (mpMutationState && mpMutationState->IsType<ApcOneHitCellMutationState>())
00080 {
00081
00082 beta_cat_level_1 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level);
00083 beta_cat_level_2 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level);
00084 }
00085 else if (mpMutationState && mpMutationState->IsType<ApcTwoHitCellMutationState>())
00086 {
00087
00088 destruction_level = 0.0;
00089 beta_cat_level_1 = 0.5;
00090 beta_cat_level_2 = 0.5;
00091 }
00092 else if (mpMutationState && mpMutationState->IsType<BetaCateninOneHitCellMutationState>())
00093 {
00094
00095 beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00096 beta_cat_level_2 = 0.5;
00097 }
00098 else
00099 {
00100
00101 beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00102 beta_cat_level_2 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00103 }
00104
00105
00106 SetDefaultInitialCondition(5, destruction_level);
00107 SetDefaultInitialCondition(6, beta_cat_level_1);
00108 SetDefaultInitialCondition(7, beta_cat_level_2);
00109 SetDefaultInitialCondition(8, wntLevel);
00110
00111 if (stateVariables != std::vector<double>())
00112 {
00113 SetStateVariables(stateVariables);
00114 }
00115 }
00116
00117 void WntCellCycleOdeSystem::SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState)
00118 {
00119 mpMutationState = pMutationState;
00120 }
00121
00122 WntCellCycleOdeSystem::~WntCellCycleOdeSystem()
00123 {
00124
00125 }
00126
00127 void WntCellCycleOdeSystem::Init()
00128 {
00129
00130
00131 double k1 = 1.0;
00132 double k2 = 1.6;
00133 double k3 = 0.05;
00134 double k16 = 0.4;
00135 double k34 = 0.04;
00136 double k43 = 0.01;
00137 double k61 = 0.3;
00138 double k23 = 0.3;
00139 double a = 0.04;
00140 double J11 = 0.5;
00141 double J12 = 5.0;
00142 double J61 = 5.0;
00143 double J62 = 8.0;
00144 double J13 = 0.002;
00145 double J63 = 2.0;
00146 double Km1 = 0.5;
00147 double Km2 = 4.0;
00148 double Km4 = 0.3;
00149 double kp = 0.05;
00150 double phi_pRb = 0.005;
00151 double phi_E2F1 = 0.1;
00152 double phi_CycDi = 0.023;
00153 double phi_CycDa = 0.03;
00154 double phi_pRbp = 0.06;
00155
00156
00157 double a1 = 0.423;
00158 double a2 = 2.57e-4;
00159 double a3 = 1.72;
00160 double a4 = 10.0;
00161 double a5 = 0.5;
00162 double WntMax = 10.0;
00163 double mitogenic_factorF = 6.0e-4;
00164 double APC_Total = 0.02;
00165
00166
00167 mk2d = k2/(Km2*phi_E2F1);
00168 mk3d = k3*a1*mitogenic_factorF/(Km4*phi_E2F1*a2);
00169 mk34d = k34/phi_E2F1;
00170 mk43d = k43/phi_E2F1;
00171 mk23d = k23*Km2/(Km4*phi_E2F1);
00172 mad = a/Km2;
00173 mJ11d = J11*phi_E2F1/k1;
00174 mJ12d = J12*phi_E2F1/k1;
00175 mJ13d = J13*phi_E2F1/k1;
00176 mJ61d = J61*phi_E2F1/k1;
00177 mJ62d = J62*phi_E2F1/k1;
00178 mJ63d = J63*phi_E2F1/k1;
00179 mKm1d = Km1/Km2;
00180 mkpd = kp/(Km2*phi_E2F1);
00181 mphi_r = phi_pRb/phi_E2F1;
00182 mphi_i = phi_CycDi/phi_E2F1;
00183 mphi_j = phi_CycDa/phi_E2F1;
00184 mphi_p = phi_pRbp/phi_E2F1;
00185 ma2d = a2/phi_E2F1;
00186 ma3d = a3*APC_Total/phi_E2F1;
00187 ma4d = a4*WntMax/phi_E2F1;
00188 ma5d = a5/phi_E2F1;
00189 mk16d = k16*Km4/phi_E2F1;
00190 mk61d = k61/phi_E2F1;
00191 mPhiE2F1 = phi_E2F1;
00192 }
00193
00194 void WntCellCycleOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY)
00195 {
00196 double r = rY[0];
00197 double e = rY[1];
00198 double i = rY[2];
00199 double j = rY[3];
00200 double p = rY[4];
00201 double c = rY[5];
00202 double b1 = rY[6];
00203 double b2 = rY[7];
00204 double wnt_level = rY[8];
00205
00206 double dx1 = 0.0;
00207 double dx2 = 0.0;
00208 double dx3 = 0.0;
00209 double dx4 = 0.0;
00210 double dx5 = 0.0;
00211 double dx6 = 0.0;
00212 double dx7 = 0.0;
00213 double dx8 = 0.0;
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229 if (!mpMutationState)
00230 {
00231
00232 }
00233 else if (mpMutationState->IsType<ApcOneHitCellMutationState>())
00234 {
00235 dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00236 dx7 = ma2d*(0.5-b1) - 0.5*ma3d*b1*c;
00237 dx8 = ma2d*(0.5-b2) - 0.5*ma3d*b2*c;
00238 }
00239 else if (mpMutationState->IsType<ApcTwoHitCellMutationState>())
00240 {
00241 dx6 = 0.0;
00242 dx7 = ma2d*(0.5-b1);
00243 dx8 = ma2d*(0.5-b2);
00244 }
00245 else if (mpMutationState->IsType<BetaCateninOneHitCellMutationState>())
00246 {
00247 dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00248 dx7 = ma2d*(0.5-b1) - ma3d*b1*c;
00249 dx8 = ma2d*(0.5-b2);
00250 }
00251 else
00252 {
00253
00254 dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00255
00256 dx7 = ma2d*(0.5-b1) - ma3d*b1*c;
00257 dx8 = ma2d*(0.5-b2) - ma3d*b2*c;
00258 }
00259
00260
00261
00262
00263 dx1 = e/(mKm1d+e)*mJ11d/(mJ11d+r)*mJ61d/(mJ61d+p) - mk16d*r*j+mk61d*p-mphi_r*r;
00264
00265 dx2 = mkpd+mk2d*(mad*mad+e*e)/(1+e*e)*mJ12d/(mJ12d+r)*mJ62d/(mJ62d+p) - e;
00266
00267 dx3 = mk3d*(b1+b2) + mk23d*e*mJ13d/(mJ13d+r)*mJ63d/(mJ63d+p) + mk43d*j - mk34d*i*j/(1+j) - mphi_i*i;
00268
00269 dx4 = mk34d*i*j/(1+j) - (mk43d+mphi_j)*j;
00270
00271 dx5 = mk16d*r*j - mk61d*p - mphi_p*p;
00272
00273 double factor = mPhiE2F1*60.0;
00274
00275 rDY[0] = dx1*factor;
00276 rDY[1] = dx2*factor;
00277 rDY[2] = dx3*factor;
00278 rDY[3] = dx4*factor;
00279 rDY[4] = dx5*factor;
00280 rDY[5] = dx6*factor;
00281 rDY[6] = dx7*factor;
00282 rDY[7] = dx8*factor;
00283 rDY[8] = 0.0;
00284 }
00285
00286 const boost::shared_ptr<AbstractCellMutationState> WntCellCycleOdeSystem::GetMutationState() const
00287 {
00288 return mpMutationState;
00289 }
00290
00291 bool WntCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double>& rY)
00292 {
00293 double r = rY[0];
00294 double e = rY[1];
00295 double p = rY[4];
00296 double dY1 = mkpd+mk2d*(mad*mad+e*e)/(1+e*e)*mJ12d/(mJ12d+r)*mJ62d/(mJ62d+p) - e;
00297 double factor = mPhiE2F1*60.0;
00298 dY1 = dY1*factor;
00299
00300 assert(!std::isnan(rY[1]));
00301 assert(!std::isnan(dY1));
00302 return (rY[1] > 1.0 && dY1 > 0.0);
00303 }
00304
00305 double WntCellCycleOdeSystem::CalculateRootFunction(double time, const std::vector<double>& rY)
00306 {
00307 return rY[1] - 1.0;
00308 }
00309
00310 template<>
00311 void CellwiseOdeSystemInformation<WntCellCycleOdeSystem>::Initialise()
00312 {
00313 this->mVariableNames.push_back("pRb");
00314 this->mVariableUnits.push_back("non_dim");
00315 this->mInitialConditions.push_back(7.357000000000000e-01);
00316
00317 this->mVariableNames.push_back("E2F1");
00318 this->mVariableUnits.push_back("non_dim");
00319 this->mInitialConditions.push_back(1.713000000000000e-01);
00320
00321 this->mVariableNames.push_back("CycD_i");
00322 this->mVariableUnits.push_back("non_dim");
00323 this->mInitialConditions.push_back(6.900000000000001e-02);
00324
00325 this->mVariableNames.push_back("CycD_a");
00326 this->mVariableUnits.push_back("non_dim");
00327 this->mInitialConditions.push_back(3.333333333333334e-03);
00328
00329 this->mVariableNames.push_back("pRb_p");
00330 this->mVariableUnits.push_back("non_dim");
00331 this->mInitialConditions.push_back(1.000000000000000e-04);
00332
00333 this->mVariableNames.push_back("APC");
00334 this->mVariableUnits.push_back("non_dim");
00335 this->mInitialConditions.push_back(NAN);
00336
00337 this->mVariableNames.push_back("Beta_Cat1");
00338 this->mVariableUnits.push_back("non_dim");
00339 this->mInitialConditions.push_back(NAN);
00340
00341 this->mVariableNames.push_back("Beta_Cat2");
00342 this->mVariableUnits.push_back("non_dim");
00343 this->mInitialConditions.push_back(NAN);
00344
00345 this->mVariableNames.push_back("Wnt");
00346 this->mVariableUnits.push_back("non_dim");
00347 this->mInitialConditions.push_back(NAN);
00348
00349 this->mInitialised = true;
00350 }
00351
00352 double WntCellCycleOdeSystem::GetWntLevel() const
00353 {
00354 return mWntLevel;
00355 }
00356
00357
00358 #include "SerializationExportWrapperForCpp.hpp"
00359 CHASTE_CLASS_EXPORT(WntCellCycleOdeSystem)