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